function date_api_form_system_settings_validate in Date 8
Same name and namespace in other branches
- 6.2 date_api.module \date_api_form_system_settings_validate()
- 7.3 date_api/date_api.module \date_api_form_system_settings_validate()
- 7 date_api/date_api.module \date_api_form_system_settings_validate()
- 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 467 - This module will make the date API available to other modules. Designed to provide a light but flexible assortment of functions and constants, with more functionality in additional files that are not loaded unless other modules specifically include them.
Code
function date_api_form_system_settings_validate(&$form, &$form_state) {
$form_values = $form_state['values'];
if ($form_values['date_api_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.'));
}
}