function hansel_ui_settings_validate in Hansel breadcrumbs 8
Same name and namespace in other branches
- 7 hansel_ui/hansel_ui.module \hansel_ui_settings_validate()
Validate callback for the Hansel settings form.
File
- hansel_ui/
hansel_ui.module, line 229 - Hansel UI module
Code
function hansel_ui_settings_validate($form, &$form_state) {
if (!preg_match('/^[0-9]+$/', $form_state['values']['hansel_max_item_length'])) {
form_set_error('hansel_max_item_length', t('The maximum length of individual breadcrumb items must be a number.'));
}
if (!preg_match('/^[0-9]+$/', $form_state['values']['hansel_max_item_count'])) {
form_set_error('hansel_max_item_count', t('The maximum number of items must be a number.'));
}
}