correction :^) 2) <field property="senha" depends="required,mask,minlength,maxlength"> <arg0 key="your.i18n.senha.name"/> ---> Password <arg1 key="${var:maxlength}" resource="false"/> ---> 6 <var> <var-name>minlength</var-name> <var-value>6</var-value> </var> ... </field>
> ----- Original Message ----- > From: "Henrique VIECILI" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Tuesday, May 18, 2004 3:24 PM > Subject: Validator - not passing params to message > > > Hi, > > I am testing the commons-validator and I have two questions: > > 1º) How to generate client side (javascript) validation using the Validator? > Do I have to put some special tag? > > 2º) I put all the messages like 'errors.required' in my app resources > properties file, but Validator seems not to be passing the params to > complete the message´s fields ( like {0} and {1} etc) > > Example: > > in ApplicationResources.properties > errors.minlength={0} can not be less than {1} characters. > > but the message is being displayed like this: > Password can not be less than null characters > > in the validation.xml > ... > <field property="senha" depends="required,mask,minlength,maxlength"> > ... > <var> > <var-name>minlength</var-name> > <var-value>6</var-value> > </var> > ... > </field> > ... > > Debugging my application I realized that the Object[] passed as param to > ActionMessage() has only the first [0] value different from null (in this > case, "Password"). > > Henrique Viecili > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]