QuickForm Rules
| From: | Matthias H. Risse | Date: | Tue, 11 May 2004 00:35:57 +0000 |
| Subject: | QuickForm Rules | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-12407@lists.php.net to get a copy of this message | ||
I wonder if anyone knows of a _clean_ approach
for a custom QF-rule which decides if a value
is valid based on more than the current element's
value it is assigned to.
AFAIK $this->container->container will do
the trick here, because a (subclassed) HTML_QuickForm_Rule
object doest have a clue (no reference) which controller instance is using it, or may i be (hopefully) wrong?
Usage example:
--------------
A global page-rule which checks if the
values in element a, b, c and d are
already present in this combination in a database.
It's basically like the login/handle-rule i explained
some days ago to someone on the list, but a little
more complex.
A grouprule would not of interrest for me,
because of the generative structure of Page
objects and its effects on the renderer.
Yours
:Matthias