function resource_conflict_form_validate in Resource Conflict 5.2
Same name and namespace in other branches
- 6.2 resource_conflict.module \resource_conflict_form_validate()
- 7.3 resource_conflict.module \resource_conflict_form_validate()
- 7.2 resource_conflict.module \resource_conflict_form_validate()
Validate the node_type_form
File
- ./
resource_conflict.module, line 233
Code
function resource_conflict_form_validate($form_id, $form_values) {
if ($form_id == 'node_type_form') {
if ($form_values['rc_type']) {
$resource_selected = FALSE;
foreach ($form_values['rc_reference_fields'] as $field) {
if ($field) {
$resource_selected = TRUE;
break;
}
}
if (!$resource_selected) {
form_set_error('rc_reference_fields', t("At least one resource field must be set if conflict handling is enabled."));
}
}
}
}