1, the use of automatic verification methods must use the Create () method to be effective;
2, if the primary key is not incremented, the function can not pass the Create () method inside whether the primary key to judge is the update operation or insert operation. This time you need to manually specify
Create ($_post,1) "Insert Data"
Create ($_post,2) "Update Data"
3 , automatic mapping is to De Yin the database character to an alias, and you can use aliases in the form.
Protected $_map = Array (
' Name ' => ' username ',
' Pass ' => ' password ',
);
Note that the front is the alias, the following is the database field, do not write back, another mapping after the automatic verification, automatically completed or to write database fields, do not write aliases
Protected $_validate=array (
Array (' name ', ' Require ', ' username required '),
Array (' Password ', ' Require ', ' password required '),
);
After using automatic mapping, automatically verifies that the fields here are also red. To use the fields of the database, you will not be able to use the fields of the form if you use the
4 , automatic completion is not performed if an automatic validation error occurs.