-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Are long dashes (—) allowed in domain name? #296
Comments
Hello @astehlik , Which is the case? |
Thank you for the feedback @egulias I updated to version 3.1 and tested again: $validator = new \Egulias\EmailValidator\EmailValidator();
// Returns true
$validator->isValid('some-name@with—invalid—dashes.de', new \Egulias\EmailValidator\Validation\RFCValidation());
// Returns also true
$validator->isValid('some-name@with—invalid—dashes.de', new \Egulias\EmailValidator\Validation\NoRFCWarningsValidation()); So normally this should return false? Cheers |
Hi @astehlik , looks like you have found a bug. Yes, should be false. I belive it will be related to encoding. |
Thank you for the info @egulias I tested it with the the so called em dash with Unicode See also: I hope this helps. Cheers |
I recently stumbled over an issue with (possibly invalid) dashes in domain names:
This validator accepts the address as valid.
The mailserver disagrees. When sending an email to this address I get an error:
Also: the native PHP
filter_var
function does not accept the address.So who is right here?
Cheers
Alex
The text was updated successfully, but these errors were encountered: