You are here

public function ContentEntityFormInterface::validateForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php \Drupal\Core\Entity\ContentEntityFormInterface::validateForm()

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 ensure that the validation logic is correctly applied independently of form submissions; e.g., for REST requests. For more information about entity validation, see https://www.drupal.org/node/2015613.

Return value

\Drupal\Core\Entity\ContentEntityTypeInterface The built entity.

Overrides FormInterface::validateForm

File

core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php, line 81
Contains \Drupal\Core\Entity\ContentEntityFormInterface.

Class

ContentEntityFormInterface
Defines a common interface for content entity form classes.

Namespace

Drupal\Core\Entity

Code

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