function resource_conflict_form_validate in Resource Conflict 6.2
Same name and namespace in other branches
- 5.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
1 string reference to 'resource_conflict_form_validate'
- resource_conflict_form_alter in ./
resource_conflict.module - Implementation of hook_form_alter
File
- ./
resource_conflict.module, line 239
Code
function resource_conflict_form_validate($form, &$form_state) {
if ($form_state['values']['form_id'] == 'node_type_form') {
if ($form_state['values']['rc_type']) {
$resource_selected = FALSE;
foreach ($form_state['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."));
}
}
}
}