You are here

function fapi_validation_register in Form API Validation 6

2 calls to fapi_validation_register()
fapi_validation_filters_execute in ./fapi_validation.module
fapi_validation_form_validate in ./fapi_validation.module
Validate the form searching for #rules and #filters params.

File

./fapi_validation.module, line 43

Code

function fapi_validation_register(&$element = NULL, $value = NULL, $form_state = NULL) {
  static $fs;
  if (!is_null($form_state)) {
    $fs = $form_state;
  }
  if (!is_null($element) && !is_null($value)) {
    form_set_value($element, $value, $fs);
    $element['#value'] = $value;
  }
  else {
    return $fs;
  }
}