/** * {@inheritdoc} */ public static function loadValidatorMetadata(ClassMetadata $classMetadata) { $classMetadata->addPropertyConstraint('title', Assert::stringType()->notBlank()); $classMetadata->addPropertyConstraint('content', Assert::stringType()); $classMetadata->addPropertyConstraint('title', Assert::intType()->notBlank(), 'foo'); $classMetadata->addPropertyConstraint('content', Assert::intType()->notBlank(), 'foo'); }
/** * {@inheritdoc} */ public static function loadValidatorMetadata(ClassMetadata $classMetadata) { $classMetadata->addPropertyConstraint('email', Assert::email()); $classMetadata->addPropertyConstraint('password', Assert::stringType()->notBlank()); }
/** * {@inheritdoc} */ public static function loadValidatorMetadata(ClassMetadata $classMetadata) { $classMetadata->addPropertyConstraint('email', Assert::email()); }