aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorneilmcgibbon2013-08-02 14:57:58 +0100
committerMatias Niemelä2013-08-07 14:02:44 -0400
commitaf731354b0b600f87f15e1573e64a7f7acc70f3d (patch)
tree8999558fbb9f985c2726d1bbc50c843eefb9ab04 /src
parenta02aaf17098006f3bf088e2b6a39b96b8b0736a9 (diff)
downloadangular.js-af731354b0b600f87f15e1573e64a7f7acc70f3d.tar.bz2
fix(input): fix the email regex to accept TLDs up to 6 characters long
The input field email regex does't not match long domain extensions. This commit extends the email regexp to take a 6 character TLD. Example 6-character TLDs include .museum and .travel - (e.g. allabout.travel).
Diffstat (limited to 'src')
-rw-r--r--src/ng/directive/input.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js
index af028fd5..f5d30a3e 100644
--- a/src/ng/directive/input.js
+++ b/src/ng/directive/input.js
@@ -1,7 +1,7 @@
'use strict';
var URL_REGEXP = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/;
-var EMAIL_REGEXP = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/;
+var EMAIL_REGEXP = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}$/;
var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/;
var inputType = {