Closed
Description
Description
When entering foo..bar@example.com
into a form field with @Assert\Email()
, this is considered valid.
However, new Address('foo..bar@example.com');
results in the RfcComplianceException
:
Email "foo..bar@example.com" does not comply with addr-spec of RFC 2822.
I know that email validation is a difficult topic ;-) But it cannot (or rather should not) be that one part of Symfony is accepting something, and another part is refusing it.
So I'm suggesting:
- Add the same pattern that
Address()
is using as mode forAssert\Email
. - And set this new mode as the default.