A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
Joined: Oct 09, 2003
Feb 11, 2005 16:44:00
I want to validate a text field.The condition is the value entered should be in small letters....no digits or special characters permitted.
My validation.xml is
<field property="userId" depends="required">
It does'nt work.
God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda
Joined: Aug 08, 2003
Feb 11, 2005 18:07:00
Including a mask within the field tag isn't enough, you'll also need to specify that you want the mask procedure to be run by adding 'mask' to the depends attribute.
Struts Validator Reference (makes a great bookmark)
Joined: Jan 24, 2005
Feb 14, 2005 16:35:00
Make sure the mask to start with "^" sign and end with "$" sign. Its new requirement since Struts 1.1. Also, "*" before "$" sign (at the end) tells that the lower case letters can occur any number of times
<field property="fieldName" depends="required, mask">
I agree. Here's the link:
it gives like"phone no must be an integer"! why?
Validation.xml....need some help
Validate multiple fields base on a requiredif
validator requiredIf checking two conds
why no errors shown for password validation in struts 1.2.4
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014