You are here

function hook_date_text_pre_validate_alter in Date 7.2

Same name and namespace in other branches
  1. 7.3 date.api.php \hook_date_text_pre_validate_alter()

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.

2 functions implement hook_date_text_pre_validate_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

date_all_day_date_text_pre_validate_alter in date_all_day/date_all_day.module
Implements hook_date_select_pre_validate_alter().
date_date_text_pre_validate_alter in ./date_elements.inc
Implements hook_date_text_pre_validate_alter().
1 invocation of hook_date_text_pre_validate_alter()
date_text_validate in date_api/date_api_elements.inc
Validation for text input.

File

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

Code

function hook_date_text_pre_validate_alter(array &$element, array &$form_state, array &$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);
}