function entityform_edit_form_validate in Entityform 7
Same name and namespace in other branches
- 7.2 entityform.admin.inc \entityform_edit_form_validate()
Form API validate callback for the entityform form
1 string reference to 'entityform_edit_form_validate'
- entityform_edit_form in ./
entityform.admin.inc - Form callback: create or edit a entityform.
File
- ./
entityform.admin.inc, line 434 - Entityform editing UI.
Code
function entityform_edit_form_validate(&$form, &$form_state) {
$entityform = $form_state['entityform'];
// Notify field widgets to validate their data.
field_attach_form_validate('entityform', $entityform, $form, $form_state);
$errors = form_get_errors();
// If fields validate then run Rules validation.
if (empty($errors)) {
$rule_returns = entityform_invoke_rules($entityform, 'validation_rules');
if (!_entityform_rules_all_pass($rule_returns)) {
form_error($form['actions']);
}
}
}