Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Closed
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.