Assuming you are still using CakePHP 3.0

I have not seen any built-in rules for this kind of validation, so my best 
guess is to roll your own.
See section "Custom Validation Rules" under "Validation" in the CakePHP 3.0 
book. That should help you on the way.

Enjoy, John

On Saturday, 18 October 2014 16:21:57 UTC+3, Radharadhya Dasa wrote:
>
> Hi,
>
> Is there a way to check if at least 3 fileds are not empty? I have 8 
> fileds and any of those could be empty, but at least 3 of them should be 
> not empty. Is there any build in validation rule, or how to do it? Should I 
> do it on beforeSave?
>
> rrd
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Reply via email to