I have customized a model class, which is set to $_validate but the automatic validation fails when the controller is applied. This is the original post, forgive me mobile phone client can not upload pictures, ask the big God pointing, I have been in this card for a long time, the original address http://tieba.baidu.com/p/4210433557
Reply content:
I have customized a model class, which is set to $_validate but the automatic validation fails when the controller is applied. This is the original post, forgive me mobile phone client can not upload pictures, ask the big God pointing, I have been in this card for a long time, the original address http://tieba.baidu.com/p/4210433557
Set to UserModel
$patchValidate
False in, set to True returns an array
Your use of exit () will naturally cause problems.
Dynamic verification is fine.
Before you exit,
Dump ($USR->create ());
Look at the output.
I see your duplicate password verification is not correct, should add the rule confirm, I use the problem is other non-empty what no problem, that is, duplicate password verification can not be used, and my duplicate password is written in the last side, I hope to help you.
A function that is generally static and then validated can be customized
You don't need a new instantiation, try it with the D method.
I said, I found the problem, but not necessarily in line with your situation, the model corresponding to the table, if not autogrow id,create validation will fail, create (update or INSERT flag) this should be able to