How validate this rules |
05-21-2024, 07:33 PM
(This post was last modified: 05-21-2024, 07:52 PM by ozornick. Edit Reason: Format code )
I have form, if checkbox in my form (print) is checked (has value 'yes') i need validate email, if not dont validate
My rules like that Code: 'print' => [ When i valudate without print i got error from valid_email
It seems not enough to do with rule params:
You can try this, maybe this is not the best way. as follow: Put that rules in your model: PHP Code: // Validation then, in your controller method add exception: PHP Code: $data = $this->request->getVar();
@xxxx[{::::::::::::::::::::::::::::::::>
|
Welcome Guest, Not a member yet? Register Sign In |