File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Using masks in Validations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Using masks in Validations" Watch "Using masks in Validations" New topic

Using masks in Validations

ajse ruku
Ranch Hand

Joined: May 06, 2005
Posts: 196
Hi all,
In my application ,there is password field in which I want to allow user input only alphanmeric value.Following is my Validation.xml file.Here required and minlength are working fine but mask is not working.Can anybody help me? I will be thankful.

with regards, Ajit

<field property="password" depends="required,mask,minlength"> <arg0 key="LoginForm.password"/> <arg1 key="${var:minlength}" name="minlength" resource="false"/> <var> <var-name>mask</var-name> <var-value>^[0-9a-zA-Z]*$</var-value> </var> <var> <var-name>minlength</var-name> <var-value>4</var-value> </var> </field>
I agree. Here's the link:
subject: Using masks in Validations
It's not a secret anymore!