You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ni...@apache.org on 2004/06/12 18:17:55 UTC
cvs commit: jakarta-struts/doc/userGuide dev_validator.xml
niallp 2004/06/12 09:17:55
Modified: doc/userGuide dev_validator.xml
Log:
Add url validator to list of standard validators
Revision Changes Path
1.45 +34 -1 jakarta-struts/doc/userGuide/dev_validator.xml
Index: dev_validator.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/doc/userGuide/dev_validator.xml,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- dev_validator.xml 6 Apr 2004 23:30:54 -0000 1.44
+++ dev_validator.xml 12 Jun 2004 16:17:55 -0000 1.45
@@ -327,8 +327,41 @@
</field>
]]></code></pre>
</li>
+ <li><strong>url</strong> - validates url format.
+ Has four <i>optional</i> variables (<code>allowallschemes</code>,
+ <code>allow2slashes</code>, <code>nofragments</code> and <code>schemes</code>)
+ which can be used to configure this validator.
+ <ul>
+ <li><strong>allowallschemes</strong> specifies whether all schemes are allowed. Valid
+ values are <code>true</code> or <code>false</code> (default is <code>false</code>).
+ If this is set to <code>true</code> then the <code>schemes</code> variable is ignored.</li>
+ <li><strong>allow2slashes</strong> specifies whether double '/' characters are allowed. Valid
+ values are <code>true</code> or <code>false</code> (default is <code>false</code>).</li>
+ <li><strong>nofragments</strong> specifies whether fragements are allowed. Valid
+ values are <code>true</code> or <code>false</code> (default is <code>false</code> - i.e.
+ fragments are allowed).</li>
+ <li><strong>schemes</strong> - use to specify a comma separated list of valid schemes. If
+ not specified then the defaults are used which are <code>http</code>,
+ <code>https</code> and <code>ftp</code>.</li>
+ </ul>
+ <pre><code><![CDATA[
+ <field property="custUrl" depends="url">
+ <arg0 key="customer.url"/>
+ </field>
-
+ <field property="custUrl" depends="url">
+ <arg0 key="customer.url"/>
+ <var>
+ <var-name>nofragments</var-name>
+ <var-value>true</var-value>
+ </var>
+ <var>
+ <var-name>schemes</var-name>
+ <var-value>http,https,telnet,file</var-value>
+ </var>
+ </field>
+ ]]></code></pre>
+ </li>
</ul>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org