diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index af028fd52923..f5d30a3e6c36 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 = { diff --git a/test/ng/directive/inputSpec.js b/test/ng/directive/inputSpec.js index 36fb754d580c..8f18964e0641 100644 --- a/test/ng/directive/inputSpec.js +++ b/test/ng/directive/inputSpec.js @@ -748,6 +748,7 @@ describe('input', function() { it('should validate email', function() { expect(EMAIL_REGEXP.test('a@b.com')).toBe(true); + expect(EMAIL_REGEXP.test('a@b.museum')).toBe(true); expect(EMAIL_REGEXP.test('a@B.c')).toBe(false); }); });