DMZ validation check |
[eluser]frist44[/eluser]
I'm trying to use DMZ in my new application and I've hit a little speed bump. I worked out a registration page and everything was good because I would do a $obj->save() and validation would run. If something was wrong, I pass the obj to the view and the error message shows next to the field. However, now I'm doing a save(), because this is for a "forgot password" page. So I want the user to input an email address. From that email, I look up a user account, and if valid, send that email their credentials. However, when I submit the form without an address, it doesn't go through validation. I looked at the $obj->validate() method, and I have a feeling that's what I'm supposed to go to, but can't figure it out. This is what I have so far. Code: public function index() {
[eluser]frist44[/eluser]
I figured it out. I missed that part of the manual. $u->validate() and then do a if($u->valid) check.
[eluser]frist44[/eluser]
Is there a way to validate a select number of the fields?
[eluser]bonatoc[/eluser]
are you using htmlform ? http://www.overzealous.com/dmz/pages/val...stom.Rules http://www.overzealous.com/dmz/pages/val...stom.Rules |
Welcome Guest, Not a member yet? Register Sign In |