-
16 Apr 2007 2:54 PM #1
Ext.form.VTypes email regexp
Ext.form.VTypes email regexp
The email regexp in Ext.form.VTypes is probably a bit too restrictive by default, only working with domains matching domain.tld. Domains like user@host.co.uk or user@some-host.com won't match.
Currently:
This will allow more subdomains, hyphens in the subdomain and only letters in the TLD/country code:Code:var email = /^([\w]+)(.[\w]+)*@([\w]+)(.[\w]{2,4}){1,2}$/;
Code:var email = /^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/;
-
16 Apr 2007 11:23 PM #2
Thanks Corey.

-
14 Jun 2009 8:09 AM #3
Will you please make a less restrictive VType in the next public release?
http://www.extjs.com/deploy/dev/exam...m/dynamic.html
Will not validate mail-me@sventore.com (due to the "-")Sven Tore Iversen
-
14 Jun 2009 3:02 PM #4
Please don't resurrect old threads to ask for something in an unsupported version. I suggest you search a little - there have been a number of discussions and modifications made to the email vtype in the 3.0 codebase.
Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide


Reply With Quote