-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
ValidatorhasPRA Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.
Description
/**
* @var string
* @ORM\Column(name="email", type="string", length=100, unique=true)
* @Assert\Email(
* message="Email is not valid",
* mode="html5"
* )
*/
private $email;
passing empty string as an email passed validation. var_dump of the $validator->validate( $object ); is below.
object(Symfony\Component\Validator\ConstraintViolationList)#3636 (1) {
["violations":"Symfony\Component\Validator\ConstraintViolationList":private]=>
array(0) {
}
}
Also found similar issue here:
#4244
I can confirm that if use together with NotBlank() constraint Email() constraint works as expected. So not very obvious behaviour of assertion.
Metadata
Metadata
Assignees
Labels
ValidatorhasPRA Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.