PHP Classes

form_date_class validation

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  PHP Forms Class with HTML Generator and JavaScript Validation package blog  >  How to Show Google Ma...  >  All threads  >  form_date_class validation  >  (Un) Subscribe thread alerts  
Subject:form_date_class validation
Summary:Fully "blank" date allowed through
Messages:3
Author:Brian Read
Date:2009-03-20 14:41:23
Update:2009-03-20 17:50:51
 

  1. form_date_class validation   Reply   Report abuse  
Picture of Brian Read Brian Read - 2009-03-20 14:41:23
I am using the form_date_class and have discovered that each pull down inclides a blank option for day/month and year. If I choose a blank one when at least one of the others is non blanlk, then I get a validation failure message, however if i choose to set all blank, then the validation does not kick in. I tried adding "ValidateAsNotEmpty", but it didn't have any effect.

  2. Re: form_date_class validation   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-03-20 16:40:00 - In reply to message 1 from Brian Read
Couldn't that be because you have set the Optional property?

  3. Re: form_date_class validation   Reply   Report abuse  
Picture of Brian Read Brian Read - 2009-03-20 17:50:51 - In reply to message 2 from Manuel Lemos
yes indeed - that was it - your example must have had that set, and I just copied and pasted the whole example in and then editted it.

So, now it only allows a blank day (which fails validation if you select it), so it works fine now. Many thanks.