A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Refactoring for Software Design Smells: Managing Technical Debt
this week in the
OO, Patterns, UML and Refactoring
Required field usage
Joined: Dec 22, 2007
Mar 19, 2008 01:48:00
I want to know will this work when I dont input any value in the birthDate text box of the form ?
Specifically what I want to know is will this be validated incase I dont input anything in birthdate field ?
<arg0 key="inputForm.birthDate" />
"You cannot change the truth but truth can change you "
Joined: Feb 08, 2006
Mar 19, 2008 12:27:00
With your definition, any empty field will not generate any validation messages. If you need the field to be filled in, change your depends value to "required,date".
Joined: Jul 21, 2004
Mar 19, 2008 13:55:00
this is just date validation.
is the not null validation.
You need to add two validations for the Birthday field
1. Not null Check.
2. If not null then check for valid date.
depends = "required,date"
address your issue
I agree. Here's the link:
subject: Required field usage
Validator for NOT NULL/ blanks
Using masks in Validations
doubt in using validwhen
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-2015