Re: QFC validation
| From: | Alexey Borzov | Date: | Mon, 27 Oct 2003 14:17:12 +0000 |
| Subject: | Re: QFC validation | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-8622@lists.php.net to get a copy of this message | ||
Hi!
Daniel Kopp wrote:
This is described in the docs. You add addRule() calls to buildForm() method and later call validate().Well, yes. If the action is bound to the submit button (unlike 'display' or 'process') then its handler has to save the values in container and (probably) perform the validation.So - how do I validate the form? Can I still use default validation which is defined in the Form (addRule)? If yes - how? If I cannot use the validation from the form I would prefer to use the way I suggested (of course with a global variables).
If you need custom action on submit, then you need to define custom action handler. If Action_Submit was enough for you I presume you wouldn't start this thread.I don't get you here. You can name the actions any way you want, as for what class to extend, there is no real use in extending Action_Submit if you are going to rewrite its perform() method.That means usually if I use the Action_Submit class I don't need to change it at all but just put the thing that I want to do in the Action connected to "process"? The only difference between the Action-class and the Action/Submit-class is found in the perform-function?