function FormBase::validateForm
Same name in other branches
- 9 core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::validateForm()
- 8.9.x core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::validateForm()
- 11.x core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::validateForm()
Overrides FormInterface::validateForm
15 calls to FormBase::validateForm()
- ActionFormBase::validateForm in core/
modules/ action/ src/ Form/ ActionFormBase.php - Form validation handler.
- BlockForm::validateForm in core/
modules/ block/ src/ BlockForm.php - Form validation handler.
- ContactFormEditForm::validateForm in core/
modules/ contact/ src/ ContactFormEditForm.php - Form validation handler.
- ContentEntityForm::validateForm in core/
lib/ Drupal/ Core/ Entity/ ContentEntityForm.php - Button-level validation handlers are highly discouraged for entity forms, as they will prevent entity validation from running. If the entity is going to be saved during the form submission, this method should be manually invoked from the button-level…
- DateFormatFormBase::validateForm in core/
modules/ system/ src/ Form/ DateFormatFormBase.php - Form validation handler.
57 methods override FormBase::validateForm()
- ActionFormBase::validateForm in core/
modules/ action/ src/ Form/ ActionFormBase.php - Form validation handler.
- AddFormBase::validateForm in core/
modules/ media_library/ src/ Form/ AddFormBase.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.
File
-
core/
lib/ Drupal/ Core/ Form/ FormBase.php, line 88
Class
- FormBase
- Provides a base class for forms.
Namespace
Drupal\Core\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
// Validation is optional.
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.