struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject svn commit: r1428445 - in /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators: EmailValidator.java StringLengthFieldValidator.java URLValidator.java
Date Thu, 03 Jan 2013 16:20:11 GMT
Author: lukaszlenart
Date: Thu Jan  3 16:20:11 2013
New Revision: 1428445

URL: http://svn.apache.org/viewvc?rev=1428445&view=rev
Log:
Adds missing parse param in example

Modified:
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.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=1428445&r1=1428444&r2=1428445&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
Thu Jan  3 16:20:11 2013
@@ -60,6 +60,7 @@ package com.opensymphony.xwork2.validato
  *     <!-- Field Validator Syntax with expressions -->
  *     <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() -->

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java?rev=1428445&r1=1428444&r2=1428445&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
(original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
Thu Jan  3 16:20:11 2013
@@ -43,36 +43,37 @@ import com.opensymphony.xwork2.validator
  *
  * <pre>
  * <!--START SNIPPET: example -->
- *      &lt;validators&gt;
- *           &lt;!-- Plain Validator Syntax --&gt;
- *           &lt;validator type="stringlength"&gt;
- *                &lt;param name="fieldName"&gt;myPurchaseCode&lt;/param&gt;
- *                &lt;param name="minLength"&gt;10&lt;/param&gt;
- *                &lt;param name="maxLength"&gt;10&lt;/param&gt;
- *                &lt;param name="trim"&gt;true&lt;/param&gt;
- *                &lt;message&gt;Your purchase code needs to be 10 characters long&lt;/message&gt;
	
- *            &lt;/validator&gt;
- * 
- *            &lt;!-- Field Validator Syntax --&gt;
- *            &lt;field name="myPurchaseCode"&gt;
- *                &lt;field-validator type="stringlength"&gt;
- *                     &lt;param name="minLength"&gt;10&lt;/param&gt;
- *                     &lt;param name="maxLength"&gt;10&lt;/param&gt;
- *                     &lt;param name="trim"&gt;true&lt;/param&gt;
- *                     &lt;message&gt;Your purchase code needs to be 10 characters
long&lt;/message&gt;
- *                &lt;/field-validator&gt;
- *            &lt;/field&gt;
+ * &lt;validators&gt;
+ *     &lt;!-- Plain Validator Syntax --&gt;
+ *     &lt;validator type="stringlength"&gt;
+ *         &lt;param name="fieldName"&gt;myPurchaseCode&lt;/param&gt;
+ *         &lt;param name="minLength"&gt;10&lt;/param&gt;
+ *         &lt;param name="maxLength"&gt;10&lt;/param&gt;
+ *         &lt;param name="trim"&gt;true&lt;/param&gt;
+ *         &lt;message&gt;Your purchase code needs to be 10 characters long&lt;/message&gt;
+ *     &lt;/validator&gt;
+ *
+ *     &lt;!-- Field Validator Syntax --&gt;
+ *     &lt;field name="myPurchaseCode"&gt;
+ *         &lt;field-validator type="stringlength"&gt;
+ *              &lt;param name="minLength"&gt;10&lt;/param&gt;
+ *              &lt;param name="maxLength"&gt;10&lt;/param&gt;
+ *              &lt;param name="trim"&gt;true&lt;/param&gt;
+ *              &lt;message&gt;Your purchase code needs to be 10 characters long&lt;/message&gt;
+ *         &lt;/field-validator&gt;
+ *     &lt;/field&gt;
  *
- *            &lt;!-- Field Validator Syntax with expression --&gt;
- *            &lt;field name="myPurchaseCode"&gt;
- *                &lt;field-validator type="stringlength"&gt;
- *                     &lt;param name="minLength"&gt;${minLengthValue}&lt;/param&gt;
&lt;!-- will be evaluated as: Integer getMinLengthValue() --&gt;
- *                     &lt;param name="maxLength"&gt;${maxLengthValue}&lt;/param&gt;
&lt;!-- will be evaluated as: Integer getMaxLengthValue() --&gt;
- *                     &lt;param name="trim"&gt;${trimValue}&lt;/param&gt;
&lt;!-- will be evaluated as: boolean getTrimValue() --&gt;
- *                     &lt;message&gt;Your purchase code needs to be 10 characters
long&lt;/message&gt;
- *                &lt;/field-validator&gt;
- *            &lt;/field&gt;
- *      &lt;/validators&gt;
+ *     &lt;!-- Field Validator Syntax with expression --&gt;
+ *     &lt;field name="myPurchaseCode"&gt;
+ *         &lt;field-validator type="stringlength"&gt;
+ *              &lt;param name="parse"&gt;true&lt;/param&gt;
+ *              &lt;param name="minLength"&gt;${minLengthValue}&lt;/param&gt;
&lt;!-- will be evaluated as: Integer getMinLengthValue() --&gt;
+ *              &lt;param name="maxLength"&gt;${maxLengthValue}&lt;/param&gt;
&lt;!-- will be evaluated as: Integer getMaxLengthValue() --&gt;
+ *              &lt;param name="trim"&gt;${trimValue}&lt;/param&gt; &lt;!--
will be evaluated as: boolean getTrimValue() --&gt;
+ *              &lt;message&gt;Your purchase code needs to be 10 characters long&lt;/message&gt;
+ *         &lt;/field-validator&gt;
+ *     &lt;/field&gt;
+ * &lt;/validators&gt;
  * <!-- END SNIPPET: example -->
  * </pre>
  * 

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java?rev=1428445&r1=1428444&r2=1428445&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
(original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
Thu Jan  3 16:20:11 2013
@@ -18,7 +18,6 @@ package com.opensymphony.xwork2.validato
 import com.opensymphony.xwork2.validator.ValidationException;
 import com.opensymphony.xwork2.util.URLUtil;
 
-
 /**
  * <!-- START SNIPPET: javadoc -->
  * 
@@ -40,20 +39,20 @@ import com.opensymphony.xwork2.util.URLU
  *
  * <pre>
  * <!-- START SNIPPET: examples -->
- * 
- *     &lt;validators&gt;
- *          &lt;!-- Plain Validator Syntax --&gt;
- *          &lt;validator type="url"&gt;
- *              &lt;param name="fieldName"&gt;myHomePage&lt;/param&gt;
- *              &lt;message&gt;Invalid homepage url&lt;/message&gt;
- *          &lt;/validator&gt;
- *          
- *          &lt;!-- Field Validator Syntax --&gt;
- *          &lt;field name="myHomepage"&gt;
+ * &lt;validators&gt;
+ *      &lt;!-- Plain Validator Syntax --&gt;
+ *      &lt;validator type="url"&gt;
+ *          &lt;param name="fieldName"&gt;myHomePage&lt;/param&gt;
+ *          &lt;message&gt;Invalid homepage url&lt;/message&gt;
+ *      &lt;/validator&gt;
+ *
+ *      &lt;!-- Field Validator Syntax --&gt;
+ *      &lt;field name="myHomepage"&gt;
+ *          &lt;field-validator type="url"&gt;
  *              &lt;message&gt;Invalid homepage url&lt;/message&gt;
- *          &lt;/field&gt;
- *     &lt;/validators&gt;
- *     
+ *          &lt;/field-validator&gt;
+ *      &lt;/field&gt;
+ * &lt;/validators&gt;
  * <!-- END SNIPPET: examples -->
  * </pre>
  *



Mime
View raw message