PDA

View Full Version : [FIXED-326][3.0.0] email VType does not allow TLDs with > 4 characters



mw-flow
23 Sep 2009, 4:44 AM
Ext version tested:


Ext 3.0 rev 0


Adapter used:


(irrelevant)


css used:


(irrelevant)


Browser versions tested against:


(irrelevant)


Operating System:


(irrelevant)


Description:


Publicly accessible Top Level Domains (TLDs) can be up to 6 characters long, ".travel" and ".museum" being examples for such TLDs. The built-in e-mail validator type does only allow four characters.




See http://www.icann.org/en/tlds/agreements/travel/travel-agreement-12apr06.htm for ICANN's registry agreement for .travel
See http://data.iana.org/TLD/tlds-alpha-by-domain.txt for ICANN's list of currently valid TLDs


Steps to reproduce the problem:


Instanciate an Ext.form.TextField and set its VType to email, try to enter "test@test.travel" as an e-mail address.


The result that was expected:


e-mail addresses with up to 6 TLD characters are not marked as invalid.


The result that occurs instead:


Starting with the 5th character in the e-mail addresse's TLD part, the address is marked as invalid.


Possible fix:


Instead of
var email =/^([\w]+)(\.[\w]+)*@([\w\-]+\.){1,5}([A-Za-z]){2,4}$/;
use
var email =/^([\w]+)(\.[\w]+)*@([\w\-]+\.){1,5}([A-Za-z]){2,6}$/;
as email test regex.

evant
27 Oct 2009, 9:16 PM
Fix applied to svn in rev #5560 for patch release 3.1.