1 form_test.module form_test_limit_validation_errors_element_validate_test(&$element, &$form_state)

Form element validation handler for the 'test' element.

File

core/modules/simpletest/tests/form_test.module, line 593
Helper module for the form API tests.

Code

function form_test_limit_validation_errors_element_validate_test(&$element, &$form_state) {
  if ($element['#value'] == 'invalid') {
    form_error($element, t('@label element is invalid', array('@label' => $element['#title'])));
  }
}