validation of password

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

validation of password

JoshN
Hi guys,

I have a <s:password> field in my form, and I would like to do a custom validation on the password, such that I can check if it contains at least 1 alphabet and 1 digit.

But when I pass the fieldvalue into my validation class, it reads as "null".

Is there anyway I can do this validation using struts?
Reply | Threaded
Open this post in threaded view
|

Re: validation of password

vinodkashyap
Administrator
Hi

You can see the following thread for your reference

http://www.nabble.com/field-validation-to16980878.html

I am sure it will solve your problem
Reply | Threaded
Open this post in threaded view
|

Re: validation of password

dynamicd
 <field name="name">
        <field-validator type="requiredstring">
            <message>Name is a required field</message>
        </field-validator>
                <field-validator type="stringlength">
                        param name="trim" true /param
                        param name="minLength" 4 /param
            <message>Name should be atleast 4 characters</message>
        </field-validator>
    </field>

put <> around the param replace name with password
Reply | Threaded
Open this post in threaded view
|

Re: validation of password

JoshN
In reply to this post by vinodkashyap
hi Vinod,

thanks for your help!

I still have got a couple of other queries though..