EntityValidationTrait
trait EntityValidationTrait (View source)
| internal | JSON:API maintains no PHP API. The API is the HTTP API. This class may change at any time and could break any dependencies on it. |
Provides a method to validate an entity.
Methods
static
validate(EntityInterface $entity, array $field_names = NULL)
Verifies that an entity does not violate any validation constraints.
Details
static protected
validate(EntityInterface $entity, array $field_names = NULL)
Verifies that an entity does not violate any validation constraints.