8.5.x FormInterface.php FormInterface::validateForm(array &$form, FormStateInterface $form_state)
8.0.x FormInterface.php FormInterface::validateForm(array &$form, FormStateInterface $form_state)
8.1.x FormInterface.php FormInterface::validateForm(array &$form, FormStateInterface $form_state)
8.2.x FormInterface.php FormInterface::validateForm(array &$form, FormStateInterface $form_state)
8.3.x FormInterface.php FormInterface::validateForm(array &$form, FormStateInterface $form_state)
8.4.x FormInterface.php FormInterface::validateForm(array &$form, FormStateInterface $form_state)
8.6.x FormInterface.php FormInterface::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.

21 methods override FormInterface::validateForm()
AjaxFormBlock::validateForm in core/modules/system/tests/modules/ajax_forms_test/src/Plugin/Block/AjaxFormBlock.php
Form validation handler.
BasicFormNoContainerInjectionInterface::validateForm in core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php
Form validation handler.
BlockListBuilder::validateForm in core/modules/block/src/BlockListBuilder.php
Form validation handler.
ContentEntityFormInterface::validateForm in core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php
Note that extending classes should not override this method to add entity validation logic, but define further validation constraints using the entity validation API and/or provide a new validation constraint if necessary. This is the only way to…
DateTimeFormInjectionTest::validateForm in core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php
Form validation handler.

... See full list

File

core/lib/Drupal/Core/Form/FormInterface.php, line 41

Class

FormInterface
Provides an interface for a Form.

Namespace

Drupal\Core\Form

Code

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