I'm working on validation between two model model1 hasMany model2. I
have a two step process where in the end users first view they need to
enter a subset of data for both model1 & 2. Once this is complete,
they're then allowed to complete the entire process which includes
additional data for each model that needs to be validated at that
point.

First step in my process:

First view contains a name field for model1 and a username for model2.
Sent to model1 controller. In the controller I'm doing the following

$this->Model1->set($this->data);
if($this->Model1->validates(array('fieldList' => array('name')))) {
//perform save with validate set to false

}

with or without the fieldList is looks to be generating the same
results. All validation rules are processed for the model. In the
process of testing I've eliminated model2 from the equation because I
can't get model1 to work. Ultimately I'd like to be able to choose a
subset of rules for both model 1 & 2 in this process. If I'm
understanding correctly $this->Model->saveAll($this->data,
array('validate' => 'only')) would still execute all validation rules.

Any ideas on why even on the basic example why the fieldList isn't
working? Am I missing something?

I'm on Cake 1.3.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to