Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Restricting to fieldwise validation in StrutsValidation

 
Sowrabha
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,


I wanted to know how to perform a fieldwise validation using validator framework.


Suppose i have a login form with userid and password and a Login Button
I have set 3 properties REQUIRED,LENGTH and MASK for each of these fields.

Now if i enter only userID that too invalid.(with just a letter) and hit the Login Button,
It will not validate the form for LENGTH and MASK for userID.It will only validate REQUIRED property for userID. Since it is satisfied it starts validating Password. and then once u enter a password then it starts validating for LENGTH of user ID,follwed by LENGTH of passwd .
Finally it validates MASK for userID and then MASK for passwd.

I wanted to know how we can restrict the validation of usedID first.and only if it is complete proceed for validating Passwd.?

Thanks,
Sowrabha
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic