8.5.x FormBase.php FormBase::validateForm(array &$form, FormStateInterface $form_state)
8.0.x FormBase.php FormBase::validateForm(array &$form, FormStateInterface $form_state)
8.1.x FormBase.php FormBase::validateForm(array &$form, FormStateInterface $form_state)
8.2.x FormBase.php FormBase::validateForm(array &$form, FormStateInterface $form_state)
8.3.x FormBase.php FormBase::validateForm(array &$form, FormStateInterface $form_state)
8.4.x FormBase.php FormBase::validateForm(array &$form, FormStateInterface $form_state)
8.6.x FormBase.php FormBase::validateForm(array &$form, FormStateInterface $form_state)

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 FormInterface::validateForm

1 call to FormBase::validateForm()
EntityDisplayModeAddForm::validateForm in core/modules/field_ui/src/Form/EntityDisplayModeAddForm.php
Form validation handler.
65 methods override FormBase::validateForm()
ActionFormBase::validateForm in core/modules/action/src/ActionFormBase.php
Form validation handler.
AjaxTestDialogForm::validateForm in core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php
Form validation handler.
AjaxTestForm::validateForm in core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestForm.php
Form validation handler.
BanAdmin::validateForm in core/modules/ban/src/Form/BanAdmin.php
Form validation handler.
BlockForm::validateForm in core/modules/block/src/BlockForm.php
Form validation handler.

... See full list

File

core/lib/Drupal/Core/Form/FormBase.php, line 88

Class

FormBase
Provides a base class for forms.

Namespace

Drupal\Core\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {

  // Validation is optional.
}