struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject svn commit: r1432586 - in /struts/struts2/trunk/xwork-core/src: main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java test/java/com/opensymphony/xwork2/validator/EmailValidatorTest.java
Date Sun, 13 Jan 2013 11:03:39 GMT
Author: lukaszlenart
Date: Sun Jan 13 11:03:39 2013
New Revision: 1432586

URL: http://svn.apache.org/viewvc?rev=1432586&view=rev
Log:
WW-3892 adjusts para names to new version of RegexpValidator

Modified:
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
    struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/validator/EmailValidatorTest.java

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java?rev=1432586&r1=1432585&r2=1432586&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
(original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
Sun Jan 13 11:03:39 2013
@@ -61,9 +61,9 @@ package com.opensymphony.xwork2.validato
  *     <field name="myEmail">
  *        <field-validator type="email">
  *           <param name="parse">true</param>*
- *           <param name="expression">${emailPattern}</param>
<!-- will be evaluated as: String getEmailPattern() -->
- *           <param name="caseSensitive">${emailCaseSensitive}</param>
<!-- will be evaluated as: boolean getEmailCaseSensitive() -->
- *           <param name="trim">${trimEmail}</param> <!--
will be evaluated as: boolean getTrimEmail() -->
+ *           <param name="regexExpression">${emailPattern}</param>
<!-- will be evaluated as: String getEmailPattern() -->
+ *           <param name="caseSensitiveExpression">${emailCaseSensitive}</param>
<!-- will be evaluated as: boolean getEmailCaseSensitive() -->
+ *           <param name="trimExpression">${trimEmail}</param>
<!-- will be evaluated as: boolean getTrimEmail() -->
  *           <message>Must provide a valid email</message>
  *        </field-validator>
  *     </field>
@@ -81,8 +81,8 @@ public class EmailValidator extends Rege
     	"\\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)$\\b";
 
     public EmailValidator() {
-        setExpression(emailAddressPattern);
-        setCaseSensitive("false");
+        setRegex(emailAddressPattern);
+        setCaseSensitive(false);
     }
 
 }

Modified: struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/validator/EmailValidatorTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/validator/EmailValidatorTest.java?rev=1432586&r1=1432585&r2=1432586&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/validator/EmailValidatorTest.java
(original)
+++ struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/validator/EmailValidatorTest.java
Sun Jan 13 11:03:39 2013
@@ -95,7 +95,7 @@ public class EmailValidatorTest extends 
         validator.setFieldName("myEmail");
         validator.setDefaultMessage("invalid email");
         validator.setParse(true);
-        validator.setExpression("${emailExpression}");
+        validator.setRegexExpression("${emailExpression}");
 
         validator.validate(action);
         valueStack.pop();
@@ -124,7 +124,7 @@ public class EmailValidatorTest extends 
         validator.setValueStack(valueStack);
 
         validator.setParse(true);
-        validator.setCaseSensitive("${emailCaseSensitive}");
+        validator.setCaseSensitiveExpression("${emailCaseSensitive}");
 
         valueStack.pop();
 
@@ -152,7 +152,7 @@ public class EmailValidatorTest extends 
         validator.setValueStack(valueStack);
 
         validator.setParse(true);
-        validator.setTrim("${trimEmail}");
+        validator.setTrimExpression("${trimEmail}");
 
         valueStack.pop();
 



Mime
View raw message