EntityResourceValidationTrait
trait EntityResourceValidationTrait (View source)
| internal |
Methods
validate(EntityInterface $entity, array $fields_to_validate = [])
Verifies that an entity does not violate any validation constraints.
Details
protected
validate(EntityInterface $entity, array $fields_to_validate = [])
Verifies that an entity does not violate any validation constraints.
The validation errors will be filtered to not include fields to which the current user does not have access and if $fields_to_validate is provided will only include fields in that array.