views:

41

answers:

1

I have written in my code like this...

$this->User->saveAll($this->data, array('validate'=>'first'));
$this->User->saveAll($this->data, array('validate'=>false));

'validate'=>false will not check for validations in model. But if I replace false with first, then what will it do?

Thanks.

+1  A: 

From http://book.cakephp.org/view/75/Saving-Your-Data

validate: Set to false to disable validation, true to validate each record before saving, 'first' to validate all records before any are saved, or 'only' to only validate the records, but not save them.

Gordon
Thanks Gordon. really helpful.
lakum4stackof