You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Thomas Thomas <de...@gmail.com> on 2006/12/08 20:53:39 UTC

Another question about Validator

Hi all,

I want to display a message of type "required" if password is not entered,
if it is entered and less than 6 chars, display *another* message of type
"minlength"

I have this for now on, but not completed :

            <field property="password" depends="required, minlength">
                <arg key="required.password"/>
                <var>
                    <var-name>minlength</var-name>
                    <var-value>6</var-value>
                </var>
            </field>

Here I will have the same message for the required problem and the minlength
problem.

Thank u for ANY help ! :-)

Re: Another question about Validator

Posted by Thomas Thomas <de...@gmail.com>.
Ok,
I used this

            <field property="password" depends="required, minlength">
                <arg name="required" key="required.password"/>
                <arg name="minlength" key="invalid.password.length"/>
                <var>
                    <var-name>minlength</var-name>
                    <var-value>6</var-value>
                </var>
            </field>

It work great.
Thank u.