开发者

while validating in cakephp, what 'validate'=>'first' does?

开发者 https://www.devze.com 2023-01-19 05:31 出处:网络
I have written in my code like this... $this->User->saveAll($this->data, array(\'validate\'=>\'first\'));

I have written in my code like this...

$this->User->saveAll($this->data, array('validate'=>'first'));
$thi开发者_StackOverflow社区s->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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消