Re: HTML_QuickForm2: Get all errors of a form

From: Date: Tue, 05 Jul 2011 12:14:36 +0000
Subject: Re: HTML_QuickForm2: Get all errors of a form
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-31157@lists.php.net to get a copy of this message
Hi Christian, On 05.07.2011 12:31, Christian Weiske wrote:
When unit testing QF2 forms, it's sometime desirable to get a list of all error messages of a form. Is this possible without iterating through all elements and calling getError() on them?
You can use an Array renderer with 'group_errors' option set to true. Of course, under the hood this still boils down to iterating over all elements and calling getError().

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