struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Barrows" <jbarr...@sssc.com>
Subject RE: Problem with validation using both minlength and maxlength on the same field
Date Wed, 01 Dec 2004 17:56:46 GMT
> -----Original Message-----
> From: jesnook@fedex.com [mailto:jesnook@fedex.com]
> Sent: Wednesday, December 01, 2004 10:49 AM
> To: user@struts.apache.org
> Subject: Problem with validation using both minlength and maxlength on
> the same field
> 
> 
> validation.xml
> ...
> ...
>          <field
>            property="myField"
>            depends="minlength, maxlength, integer">
>            <arg0 key="sampleApp.myField.label"/>
>            <arg1 key="sampleApp.myField.minLen" name="minlength"  />

		One of these is not correct.. arg1 for both, probably confusing Validator.

>            <arg1 key="sampleApp.myField.maxLen" name="maxlength"  />

		<var><var-name>minlength</var-name><var-value>3</var-value></var>
		<var><var-name>maxlength</var-name><var-value>30</var-value></var>

>          </field>

	have you thought of intRange instead?  Probably closer to what you're looking for.  Error
message would make more sense maybe.  Number must be fewer then X characters is odder then
Number must be between X and XX.  Or maybe not...


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message