Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.2.16

Bug #7470 $form->Validate() == true after succesful $form->SetElementError() call
Submitted: 2006-04-24 11:02 UTC
From: ben dot lancaster at design-ontap dot co dot uk Assigned: avb
Status: Closed Package: HTML_QuickForm (version 3.2.5)
PHP Version: 4.4.1 OS: FC4
Roadmaps: (Not assigned)    
Subscription  


 [2006-04-24 11:02 UTC] ben dot lancaster at design-ontap dot co dot uk (Ben)
Description: ------------ Validate() still returns true even after SetElementError() has been succesfully applied to an element. Suggest adding an additional flag to the SetElementError() method to indicate whether the error set should force Validate() to fail. Test script: --------------- <?php $form = new HTML_QuickForm; $form->addElement('text','field','This field should fail:'); if($form->isSubmitted()) $form->setElementError('field','Sorry, that field is invalid'); if($form->Validate()) echo 'validated'; else echo 'not validated'; ?> Expected result: ---------------- not validated Actual result: -------------- validated

Comments

 [2006-05-29 14:37 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-06-03 11:57 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!