开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜