PEAR QuickForm Problems Verifying date.

From: Date: Wed, 02 Jul 2003 10:29:17 +0000
Subject: PEAR QuickForm Problems Verifying date.
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6377@lists.php.net to get a copy of this message
I want to validate a date pear field with checkdate function from php to validate if its valid gregorian date, what is my error?, if I pfrint the value for $data inside checkData function I obtain a string:"DataReportMin", when what I would expect is an array containing [d]-> [m]-> [Y]-> so I could verify it. Is this a bug? or a should do? Or Am I mistaking anything... Code: $form->addElement('date', 'DataReportMin', 'Data Report Minima:', array('format'=>'dmY', 'minYear'=>1999, 'maxYear'=>$year)); function checkData($data, $domainCheck = false) { return checkdate ($data['m'],$data['d'],$data['Y']); } $form->registerRule('checkdata', 'function', 'checkData'); $form->addRule('DataReportMin', 'Data incorrecta', 'checkdata', true);

« previous php.pear.general (#6377) next »