Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email aaa@@@@bbb.com is valid #19385

Closed
miroslavhajek opened this issue Jul 19, 2016 · 4 comments
Closed

Email aaa@@@@bbb.com is valid #19385

miroslavhajek opened this issue Jul 19, 2016 · 4 comments

Comments

@miroslavhajek
Copy link

        $builder = new ValidatorBuilder();
        $validator = $builder->getValidator();

        $inputData = [
            'email' => 'aaa@@@@bbb.com',
        ];

        $val = new Collection([
            'email' => [
                new Email(),
            ],
        ]);

Is valid.... Problem is in Symfony\Component\Validator\Constraints\EmailValidator::validate on line 81. Expected message is Array[email]: This value is not a valid email address. (code bd79c0ab-ddba-46cc-a703-a7a4b08de310).

@javiereguiluz
Copy link
Member

Thanks for reporting this error. In the past we've tried several times to improve the email validator. This is the latest attempt: #18177 But for different reasons, we never implement those changes.

@xabbuh
Copy link
Member

xabbuh commented Jul 19, 2016

Are you sure that this address is valid? Even the egulias/email-validator library seems to consider it invalid.

@fabpot
Copy link
Member

fabpot commented Jul 19, 2016

Indeed, this is not a valid email address.

@fabpot fabpot closed this as completed Jul 19, 2016
@stof
Copy link
Member

stof commented Jul 19, 2016

Note that if you don't run the email validation in strict mode, this will indeed not be detected as invalid, but this is expected. When not using the strict validation, lots of invalid emails will go undetected (this is why we use a dedicated library in strict mode)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants