You are here

function date_api_form_system_settings_validate in Date 7.3

Same name and namespace in other branches
  1. 8 date_api/date_api.module \date_api_form_system_settings_validate()
  2. 6.2 date_api.module \date_api_form_system_settings_validate()
  3. 7 date_api/date_api.module \date_api_form_system_settings_validate()
  4. 7.2 date_api/date_api.module \date_api_form_system_settings_validate()

Validate that the option to use ISO weeks matches first day of week choice.

1 string reference to 'date_api_form_system_settings_validate'
date_api_form_system_regional_settings_alter in date_api/date_api.module
Implements hook_form_FORM_ID_alter() for system_regional_settings().

File

date_api/date_api.module, line 2863
This module will make the date API available to other modules.

Code

function date_api_form_system_settings_validate(&$form, &$form_state) {
  $form_values = $form_state['values'];
  if ($form_values['date_api_use_iso8601'] && $form_values['date_first_day'] != 1) {
    form_set_error('date_first_day', t('When using ISO-8601 week numbers, the first day of the week must be set to Monday.'));
  }
}