You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Niall Pemberton <ni...@gmail.com> on 2006/03/21 21:11:20 UTC

Re: Arg1 not being replaced in validator?

On 3/21/06, Alluri, Ramakrishna <Ra...@compucredit.com> wrote:
> That worked..
> Excellent, Thank you so much(I have been breaking my heads for hours :)

OK good. The arg0-arg3 format has been "deprecated" by and replaced by
<arg position=".."/> - if you need to move to the new validator DTD
you would need to replace these anyway. Having said that this bug is
fixed in the (hopefully) upcoming Validator 1.3 version.

Niall

> Ram
>
> -----Original Message-----
> From: Niall Pemberton [mailto:niall.pemberton@blueyonder.co.uk]
> Sent: Tuesday, March 21, 2006 2:07 PM
> To: Jakarta Commons Users List
> Subject: Re: Arg1 not being replaced in validator?
>
> What version of validator are you using? There was a problem in
> Validator 1.2.0, using the arg0 - arg1 format. If your using that
> version, try replacing it with <arg position=""...>
>
> <arg position="1" key="${var:minlength}" name="minlength"
> resource="false"/>
>
> Niall
>
> ----- Original Message -----
> From: "Alluri, Ramakrishna" <Ra...@compucredit.com>
> Sent: Tuesday, March 21, 2006 6:55 PM
>
>
> I am using struts common validator for validating required, minlength
> and maxlength for the fields
>
> However, I see that arg1 is not being replaced with the value. Here is
> the example:
>
> <field property="solicitationNbr" depends="required,integer,minlength">
>
> <arg0 key="solicitationNbr"/>
>
> <arg1 key="${var:minlength}" name="minlength" resource="false"/>
>
> <var><var-name>minlength</var-name><var-value>12</var-value></var>
>
> </field>
>
> However, I get the following message
>
> solicitationNbr can not be less than null characters. Any idea why {1}
> is not being substituted with number '12' ?

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