-
Notifications
You must be signed in to change notification settings - Fork 11.4k
email validator says that *@* is valid e-mail address #28596
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
Comments
|
This issue keeps coming up, I don't think the change to email validation represents what most developers would want/expect. I'd love to see it reconsidered, or the strict email validation becoming opt-in. |
I opened discussion beginning of March: laravel/ideas#1555 |
Please see the links in the comments above and try to search for your issue before opening up a new one. Thanks! |
It looks like this cannot be resolved by opening support tickets in the package used for email validation, It already has options to resolve this so those options would need to be somehow integrated into laravel. I added a comment in laravel/ideas#1555 listed above about modifications that could be made to the email validation rule to get around this. I don't think this is a bug, just there is a number of cases where an override may be required to achieve the needed level of email validation. The package used by laravel supports that, however that control is not extended through rule options. |
Until this can be handled by Laravel, one can extend the validator with a custom rule. Add the following to the use Illuminate\Support\Facades\Validator;
Validator::extend(
'email_simple',
function ($attribute, $value, $parameters, $validator) {
return filter_var($value, FILTER_VALIDATE_EMAIL);
}
); This will allow you to use the |
Description: After update to laravel 5.8 e-mail validation seems broken and things like @ are consider valid e-mail addresses.
Steps To Reproduce:
run this PHP unit test:
The text was updated successfully, but these errors were encountered: