Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Reverting changes...
After some tests that was identified that the regex is not the cause of
problem.
  • Loading branch information
diegoep committed Jul 10, 2015
commit 7613222bdaf63bd5ac852f42fa08a3f66406b45b
5 changes: 3 additions & 2 deletions src/validation-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,9 @@ angular
break;
case "email" :
validator = {
// Email pattern pulled from http://www.w3.org/TR/html5/forms.html#valid-e-mail-address
pattern: "/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/",
// Email RFC 5322, pattern pulled from http://www.regular-expressions.info/email.html
// but removed necessity of a TLD (Top Level Domain) which makes this email valid: admin@mailserver1
pattern: "(?:[\\wа-я0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.?[\\wа-я0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[\\wа-я0-9](?:[\\wа-я0-9-]*[\\wа-я0-9])?\\.?)+[\\wа-я0-9](?:[\\wа-я0-9-]*[\\wа-я0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.?){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[\\wа-я0-9-]*[\\wа-я0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])",
message: "INVALID_EMAIL",
type: "regex"
};
Expand Down