public function EntityFormController::validate

Implements \Drupal\Core\Entity\EntityFormControllerInterface::validate().

Overrides EntityFormControllerInterface::validate

8 calls to EntityFormController::validate()
AccountFormController::validate in drupal/core/modules/user/lib/Drupal/user/AccountFormController.php
Overrides Drupal\Core\Entity\EntityFormController::submit().
ActionFormControllerBase::validate in drupal/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
Implements \Drupal\Core\Entity\EntityFormControllerInterface::validate().
BlockFormController::validate in drupal/core/modules/block/lib/Drupal/block/BlockFormController.php
Overrides \Drupal\Core\Entity\EntityFormController::validate().
CategoryFormController::validate in drupal/core/modules/contact/lib/Drupal/contact/CategoryFormController.php
Overrides Drupal\Core\Entity\EntityFormController::validate().
MenuLinkFormController::validate in drupal/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php
Overrides EntityFormController::validate().

... See full list

11 methods override EntityFormController::validate()

File

drupal/core/lib/Drupal/Core/Entity/EntityFormController.php, line 243
Contains \Drupal\Core\Entity\EntityFormController.

Class

EntityFormController
Base class for entity form controllers.

Namespace

Drupal\Core\Entity

Code

public function validate(array $form, array &$form_state) {

  // @todo Exploit the Field API to validate the values submitted for the
  // entity properties.
  $entity = $this
    ->buildEntity($form, $form_state);
  $info = $entity
    ->entityInfo();
  if (!empty($info['fieldable'])) {
    field_attach_form_validate($entity, $form, $form_state);
  }

  // @todo Remove this.
  // Execute legacy global validation handlers.
  unset($form_state['validate_handlers']);
  form_execute_handlers('validate', $form, $form_state);
}