You are here

function _fapi_validation_element_validate in Form API Validation 6

1 call to _fapi_validation_element_validate()
fapi_validation_form_validate in ./fapi_validation.module
Validate the form searching for #rules and #filters params.

File

./fapi_validation.module, line 26

Code

function _fapi_validation_element_validate(&$elements, $child = FALSE) {
  if (isset($elements['#filters'])) {
    fapi_validation_filters_execute($elements);
  }
  if (isset($elements['#rules'])) {
    fapi_validation_rules_execute($elements);
  }
  $values = array();
  foreach (element_children($elements) as $key) {
    _fapi_validation_element_validate($elements[$key], TRUE);
  }
  return $values;
}