function _content_taxonomy_autocomplete_widget_settings_maxlength_validate in Content Taxonomy 6
Same name and namespace in other branches
- 6.2 content_taxonomy_autocomplete.module \_content_taxonomy_autocomplete_widget_settings_maxlength_validate()
1 string reference to '_content_taxonomy_autocomplete_widget_settings_maxlength_validate'
- content_taxonomy_autocomplete_widget_settings in ./
content_taxonomy_autocomplete.module - Implementation of hook_widget_settings
File
- ./
content_taxonomy_autocomplete.module, line 101 - Defines a widget type for content_taxonomy with autocomplete
Code
function _content_taxonomy_autocomplete_widget_settings_maxlength_validate($element, &$form_state) {
$value = $form_state['values']['maxlength'];
if (!is_numeric($value) || intval($value) != $value || $value <= 0) {
form_error($element, t('"Maximum length" must be a positive integer.'));
}
}