-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
DNS validation succeeds for missing mx records #258
Comments
Hi @tpetry , it is a valid point the one you are rising. The DNS validation was inherited in "logic" from Dominic Sayer's "isemail" function/lib. The point is that changing a behaviour would force a major version change. I'm working on a new version and it could fit. Meanwhile I can suggest you add the logic by wrapping the validator in a new validator implementing the interface. I think very recently this ability was merged into laravel. |
Hi, The RFC says that if a MX is not present, the domain is still valid with a https://en.wikipedia.org/wiki/MX_record
|
Behaviour change has been done for v3 to be a little bit more "real life" friendly. |
The email address
xxx@icluod.com
(transposedo
andu
) passes dns validations, but in my opinion it should not. The dns validation recognizes that theicluod.com
domain has anA
record but noMX
record. The validation is successful and a warning is stored that no mx record could be found.But is this really the correct semantics that the dns validator should do? For this domain, it will return that everything is valid and you can send an email to the recipient. However, if you check the warnings (which not everyone will do), you will see that it is indeed invalid, since there is no mx record for the domain.
One could argue that the caller has to add the logic for checking the warning. The laravel framework (#34092) believes that the return code is the only relevant result for detecting whether an email address is correct and warnings should not lead to a validation error. That is, it would only fail if this library changes its behavior.
So what is the reason for the current (strange?) behavior.
The text was updated successfully, but these errors were encountered: