Repository: struts Updated Branches: refs/heads/support-2-3 4d888a5ab -> c349dfa5a
WW-4735 Ports more relax domain suffix validation Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/c349dfa5 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/c349dfa5 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/c349dfa5 Branch: refs/heads/support-2-3 Commit: c349dfa5abb6f6072304eca3d679d6f2dd448f52 Parents: 4d888a5 Author: Lukasz Lenart <lukaszlen...@apache.org> Authored: Fri Mar 24 11:45:51 2017 +0100 Committer: Lukasz Lenart <lukaszlen...@apache.org> Committed: Fri Mar 24 11:45:51 2017 +0100 ---------------------------------------------------------------------- .../xwork2/validator/validators/EmailValidator.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/c349dfa5/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java ---------------------------------------------------------------------- diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java index 9410eb6..98958a0 100644 --- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java +++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java @@ -23,7 +23,7 @@ package com.opensymphony.xwork2.validator.validators; * The regular expression used to validate that the string is an email address is: * * <pre> - * \\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|nato|net|org|pro|tel|travel|xxx|tech|cat)$\\b + * \\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,6})$\\b * </pre> * * You can also specify expression, caseSensitive and trim params as a OGNL expression, see the example below. @@ -78,9 +78,7 @@ package com.opensymphony.xwork2.validator.validators; */ public class EmailValidator extends RegexFieldValidator { - // see XW-371 - public static final String EMAIL_ADDRESS_PATTERN = - "\\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|nato|net|org|pro|tel|travel|xxx|tech|cat)$\\b"; + public static final String EMAIL_ADDRESS_PATTERN = "\\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,6})$\\b"; public EmailValidator() { setRegex(EMAIL_ADDRESS_PATTERN);