Description
Description (*)
During the check of the hostname part of an email address in \Zend_Validate_EmailAddress::_validateHostnamePart
, the Top Level Domain (TLD) will be validated in \Zend_Validate_Hostname::isValid
.
The TLD is finally tested against a hardcoded values from \Zend_Validate_Hostname::$_validIdns
.
For reasons unknown to me, in a project the part ->setValidateTld(false)
is added before the isValid
call in \Zend_Validate_EmailAddress::_validateHostnamePart
.
I only checked validation of the email during customer registration. It can be that this part was needed for something else, I am not sure yet.
I checked against 1.9.4.5 and the list of TLD seems to be in order.
If $this->_options['tld']
is true (controllable by setValidateTld
), the TLD matching will take place, otherwise not.
Expected behavior (*)
I have no expectation, other than to perhaps allow from the backend to control to whether or not validate parts of the email or not.
Or maybe (partially) control the list of TLDs in case new TLDs get added - and ZF1future doesnt get updated (unlikely)
Benefits
As I have not established a use-case for this feature request, and I cannot grasp the use-case myself, I feel like the benefits are very minor. Its only created as its maybe worth a discussion.
Also, reports from the Discord said thats "impossible" (or rather more difficult) for Zend classes to be overwritten since ZF1future introduction. A Zend class can no longer simply be put in the app/local
codepool for overwrites.
Thats just a side-note, in case a more dramatic use case arises to control parts of how Zend behaves. And maybe more projects exists that changed behaviour from Zend.
Additional information
This feature request was created since flyingmana asked for it on Discord.