public function ContentEntityFormInterface::validateForm in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php \Drupal\Core\Entity\ContentEntityFormInterface::validateForm()
- 10 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\ContentEntityInterface 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\EntityCode
public function validateForm(array &$form, FormStateInterface $form_state);