I think, you have to implement your own validator. Let is inherent from the original validator and overwrite the appropiate method. Than you can skip the validation if the field was empty.

Sven

Shah, Shrihas (OFT) wrote:

Hi :



I have a date field and it is not a required field. If somebody enters the value then It has to be valid date though. How should I do it? I have removed required flag in my validation.xml but it still says required.



My validation.xml entry looks like



<field property="dob"

depends="date">

<arg0 key="createAccountLevel1Form.dob"/>

<var>

<var-name>datePatternStrict</var-name>

<var-value>MM/dd/yyyy</var-value>

</var>

</field>



I removed required flag but it still stays required.





Thanks



Shrihas.



//Shrihas Shah///
//NYS Office for Technology//
//[EMAIL PROTECTED]//
//Phone (518) 408-2382//
//Fax (518) 473-3389//
//(US Postal Service Regular Mail Address)//
//State Capitol ESP, PO Box 2062//
//Albany, NY 12220-0062//
//(Parcel Post/Overnight and Interagency Mail Address)//
//Empire State Plaza//
//Swan St., Core 4, 1st Floor//
//Albany, NY 12223///





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to