You are here

function hook_date_popup_pre_validate_alter in Date 7.3

Same name and namespace in other branches
  1. 8 date.api.php \hook_date_popup_pre_validate_alter()
  2. 7.2 date.api.php \hook_date_popup_pre_validate_alter()

Alter the date_popup 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_popup_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_popup_pre_validate_alter in date_all_day/date_all_day.module
Implements hook_date_select_pre_validate_alter().
date_date_popup_pre_validate_alter in ./date_elements.inc
Implements hook_date_popup_pre_validate_alter().
1 invocation of hook_date_popup_pre_validate_alter()
date_popup_validate in date_popup/date_popup.module
Massage the input values back into a single date.

File

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

Code

function hook_date_popup_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);
}