public function FlaggingCollectionTypeForm::validateForm in Flag Lists 4.0.x
Same name and namespace in other branches
- 8 src/Form/FlaggingCollectionTypeForm.php \Drupal\flag_lists\Form\FlaggingCollectionTypeForm::validateForm()
Form validation handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormBase::validateForm
File
- src/
Form/ FlaggingCollectionTypeForm.php, line 72
Class
- FlaggingCollectionTypeForm
- Form for setting Flagging Collection Type properties.
Namespace
Drupal\flag_lists\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
// Verify that the name is not longer than 32 charaters.
if (strlen($form_state
->getValue('id')) > 32) {
$form_state
->setErrorByName('id', $this
->t('Please provide an id that is maximum 32 characters long.'));
}
parent::validateForm($form, $form_state);
}