function user_relationships_setting_validation in User Relationships 5
Same name and namespace in other branches
- 5.2 user_relationships_actions.inc \user_relationships_setting_validation()
- 7 user_relationships.module \user_relationships_setting_validation()
File
- ./
user_relationships_actions.inc, line 28
Code
function user_relationships_setting_validation($element, $validations) {
foreach ($validations as $validation => $info) {
$arguments = array(
$element['#value'],
);
if (isset($info['valid_options'])) {
$arguments[] = $info['valid_options'];
}
if (!call_user_func_array($validation, $arguments)) {
form_set_error($element['#name'], $info['msg']);
}
}
}