You are here

function ife_form_validator in Inline Form Errors 6.2

Same name and namespace in other branches
  1. 6 ife.module \ife_form_validator()
  2. 7.2 ife.module \ife_form_validator()
  3. 7 ife.module \ife_form_validator()

Function to set the general error mesage if set

1 string reference to 'ife_form_validator'
ife_form_alter in ./ife.module
Implementation of hook_form_alter().

File

./ife.module, line 166
Drupal hooks

Code

function ife_form_validator($form, &$form_state) {
  $form_errors = form_get_errors();
  if (!empty($form_errors)) {
    $message = t(variable_get('ife_general_message', 'Please correct all highlighted errors and try again.'));
    drupal_set_message($message, 'error');
  }
}