1.20.x date.api.php hook_date_text_pre_validate_alter(&$element, &$form_state, &$input)

Alter the date_text element before the rest of the validation is run.

Parameters

array $element: The $element array.

array $form_state: A keyed array containing the current state of the form.

array $input: The array of input values to be validated.

File

modules/date/date.api.php, line 117
Hooks provided by the Date module.

Code

function hook_date_text_pre_validate_alter(&$element, &$form_state, &$input) {
  // Let Date module massage the format for all day values so they will pass
  // validation. The All day flag, if used, actually exists on the parent
  // element.
  date_all_day_value($element, $form_state);
}