-
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reimplement DNSCheckValidation (#250)
* Reimplement DNSCheckValidation to utilise get_dns_record and extend support for detection of Null MX records (RFC7505) and reserved, mDNS and private namespaces (RFC2606 & RFC6762) * Change valid email tests to use github.com instead of example.com as example.com now (correctly) fails the tests due to the Null MX case * Tweak to pass CI psalm issue * Encapsulate dns check code. Simplify local and reserved domain checks. Switch test domain * Set PHPDoc return type * Use strict comparisons
- Loading branch information
Showing
4 changed files
with
175 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace Egulias\EmailValidator\Exception; | ||
|
||
class DomainAcceptsNoMail extends InvalidEmail | ||
{ | ||
const CODE = 154; | ||
const REASON = 'Domain accepts no mail (Null MX, RFC7505)'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace Egulias\EmailValidator\Exception; | ||
|
||
class LocalOrReservedDomain extends InvalidEmail | ||
{ | ||
const CODE = 153; | ||
const REASON = 'Local, mDNS or reserved domain (RFC2606, RFC6762)'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters