OK, I think I worked out what to name the file and where to save it:
app/models/behaviours/multi_validate.php. However I can't get it to
work. The form submits without validating.
I first set my validation rules in the model eg:
var $actsAs = array('MultiValidatable');
/**
Ok,
I dug around and found out what to name the file and where to save it,
I think. I saved the file as multi_validate.php in app/models/
behaviours/. Is this correct?
I then defined my rules eg:
var $validationSets = array(
'admin' => array(
Hi,
thanks for your help, its really appreciated. I'm new to cake and
although I know its going to be beneficial in the long run right now
the learning curve sucks and what really makes it worse is the lack of
decent documentation.
For example the behaviour you gave me the link to seems to do ex
> How do I run cake's validation methods on each form separately. At the
> moment you appear to define your rules in $validate outside of any
> functions/methods. How do I run it from within a method.
Use this behavior:
http://bakery.cakephp.org/articles/view/using-many-validation-rulesets-per-m
Hey
Foreach form create a new instance of corresponding model where data
should be saved:
$foo = new MyModel();
foreach($posteddata){
$foo->create($myPostedData);
if ($foo->validates()){
//great...
} else {
$errors = $foo->validationErrors;
]
All your other questions are well documented btw :-