public function ContentEntityFormInterface::validateForm

public ContentEntityFormInterface::validateForm(array &$form, FormStateInterface $form_state)

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 76

Class

ContentEntityFormInterface
Defines a common interface for content entity form classes.

Namespace

Drupal\Core\Entity

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!ContentEntityFormInterface.php/function/ContentEntityFormInterface::validateForm/8.1.x