You are here

function _faqfield_element_validate_question_length in FAQ Field 7

Element validation callback for question length setting.

1 string reference to '_faqfield_element_validate_question_length'
faqfield_field_settings_form in ./faqfield.module
Implements hook_field_settings_form().

File

./faqfield.module, line 224
FAQ Field Provides a field for frequently asked questions.

Code

function _faqfield_element_validate_question_length($element, &$form_state, $form) {
  if ($element['#value'] > 255 || $element['#value'] < 10) {
    form_error($element, t('Maximum length of question must be between 10 - 255.'));
  }
}