[dev] Form: date field and its format

Xavier Perseguers pub at perseguers.ch
Thu Aug 11 06:32:34 PDT 2005


If I add a date field with a given format :

$form->addVariable(_("Start Date"), 'proposal_date_start', 'date', true, 
false, '', array('%d.%m.%y'));

I do not get any check of correctness when validating it. In 
Horde/Form.php, function isValid() only checks whether the field is 
required. however for field type 'time', there is a preg_match scanning 
for digits and colon. Is there something missing in my version of 
isValid() or do I have to check correctness somewhere else? And what 
about converting the format I use for the form and SQL-valid date format?

Thanks
Xavier Perseguers


More information about the dev mailing list