| Author |
Required field usage
|
Shaan patil
Ranch Hand
Joined: Dec 22, 2007
Posts: 58
|
|
Hi, 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 ? <field property="birthDate" depends="date"> <arg0 key="inputForm.birthDate" /> <var> <var-name>datePattern</var-name> <var-value>MM-dd-yyyy</var-value> </var> </field>
|
"You cannot change the truth but truth can change you "
|
 |
Brent Sterling
Ranch Hand
Joined: Feb 08, 2006
Posts: 948
|
|
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". - Brent
|
 |
Srilakshmi Vara
Ranch Hand
Joined: Jul 21, 2004
Posts: 169
|
|
depends="date" this is just date validation. required 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
|
 |
 |
|
|
subject: Required field usage
|
|
|