ConstraintViolation::getCause()

mixed getCause() Returns the cause of the violation. Return Value mixed

ConstraintValidatorInterface

interface ConstraintValidatorInterface Methods initialize(ExecutionContextInterface $context) Initializes the constraint validator. validate(mixed $value, Constraint $constraint) Checks if the passed value is valid. Details initialize(ExecutionContextInterface $context) Initializes the constraint validator. Parameters ExecutionContextInterface $context The current validation context validate(mixed $value, Co

ConstraintValidatorInterface::initialize()

initialize(ExecutionContextInterface $context) Initializes the constraint validator. Parameters ExecutionContextInterface $context The current validation context

ConstraintValidatorFactory

class ConstraintValidatorFactory implements ConstraintValidatorFactoryInterface Default implementation of the ConstraintValidatorFactoryInterface. This enforces the convention that the validatedBy() method on any Constraint will return the class name of the ConstraintValidator that should validate the Constraint. Methods __construct() ConstraintValidatorInterface getInstance(Constraint $constraint) Given a Constraint, this returns the ConstraintValidatorInterface object that should

ConstraintValidatorFactoryInterface

interface ConstraintValidatorFactoryInterface Specifies an object able to return the correct ConstraintValidatorInterface instance given a Constraint object. Methods ConstraintValidatorInterface getInstance(Constraint $constraint) Given a Constraint, this returns the ConstraintValidatorInterface object that should be used to verify its validity. Details ConstraintValidatorInterface getInstance(Constraint $constraint) Given a Constraint, this re

ConstraintDefinitionException

class ConstraintDefinitionException extends ValidatorException

ConstraintValidator

class ConstraintValidator implements ConstraintValidatorInterface Base class for constraint validators. Constants PRETTY_DATE Whether to format {@link \DateTime} objects as RFC-3339 dates ("Y-m-d H:i:s"). OBJECT_TO_STRING Whether to cast objects with a "__toString()" method to strings. Methods initialize(ExecutionContextInterface $context) Initializes the constraint validator. Details initialize(ExecutionContextInterface $context) Init

ConstraintValidatorFactory

class ConstraintValidatorFactory implements ConstraintValidatorFactoryInterface Uses a service container to create constraint validators. A constraint validator should be tagged as "validator.constraint_validator" in the service container and include an "alias" attribute: <service id="some_doctrine_validator"> <argument type="service" id="doctrine.orm.some_entity_manager" /> <tag name="validator.constraint_validator" alias="some_alias" /> </service> A constra

Constraint::validatedBy()

string validatedBy() Returns the name of the class that validates this constraint. By default, this is the fully qualified name of the constraint class suffixed with "Validator". You can override this method to change that behaviour. Return Value string

Constraint::getErrorName()

static string getErrorName(string $errorCode) Returns the name of the given error code. Parameters string $errorCode The error code Return Value string The name of the error code Exceptions InvalidArgumentException If the error code does not exist