records Archives

How to validate records before inserting in CakePHP 2.X

Author - Webner
|
0 Comments
|

Problem:

Sometimes we only need to validate records before inserting operations in CakePHP. In the case of bulk insertion and CSV records validation, it’s very difficult to validate individual fields of bulk records.

Solution:

array (‘validate’ => ‘only’) parameter will do exactly that for us.

Read more…