public function Media::validate in Media entity 8
Validates the currently set values.
Return value
\Drupal\Core\Entity\EntityConstraintViolationListInterface A list of constraint violations. If the list is empty, validation succeeded.
Overrides ContentEntityBase::validate
File
- src/
Entity/ Media.php, line 258
Class
- Media
- Defines the media entity class.
Namespace
Drupal\media_entity\EntityCode
public function validate() {
$this
->getType()
->attachConstraints($this);
return parent::validate();
}