aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive
diff options
context:
space:
mode:
authorCaitlin Potter2014-01-21 21:19:31 -0500
committerCaitlin Potter2014-01-21 21:40:55 -0500
commit79e519fedaec54390a8bdacfb1926bfce57a1eb6 (patch)
treec26cecaf9a3c91d41cc069771ee116bb88a337bf /src/ng/directive
parent7cf5544a9f5bea443ccac2143765154760ceaff9 (diff)
downloadangular.js-79e519fedaec54390a8bdacfb1926bfce57a1eb6.tar.bz2
fix(input): use Chromium's email validation regexp
This change uses the regexp from Chromium/Blink to validate emails, and corrects an error in the validation engine, which previously considered an invalid email to be valid. Additionally, the regexp was invalidating emails with capital letters, however this is not the behaviour recomended in the spec, or implemented in Chromium. Closes #5899 Closes #5924
Diffstat (limited to 'src/ng/directive')
-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 706844eb..53a8ddd4 100644
--- a/src/ng/directive/input.js
+++ b/src/ng/directive/input.js
@@ -9,7 +9,7 @@
*/
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,6}$/;
+var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*$/i;
var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/;
var inputType = {