The model class defines the validation factor format supported by the $_validate property: Format: Array (validation field, validation rule, error prompt, validation condition, additional rule, validation time).
Validation criteria:
(1) Model::exists_to_vailidate or 0 existence field is verified (default)
(2) Model::must_to_validate or 1 must be verified
(3) Verify when model::value_to_vailidate or 2 value is not empty
There are additional validation rule syntax: Mate validation rules can be used
(1) The Regex uses regular validation to indicate that the validation rule defined earlier is a regular expression (default)
(2) Function validation is used, and the validation rule defined above is a functional name
(3) Callback use method validation, the previously defined validation rule is a method of the current model class
(4) Confirm Verify that the two fields in the form are the same, the validation rule defined above is a field name
(5) Equal verify that the value is equal to a value that is defined by the previous validation rule
(6) in to verify that the validation rule defined above must be an array within a range
(7) Unique authentication, the system will query the database based on the current value of the field to determine whether the same value exists
Require field must, email mailbox, URL URL address, currency currency, number
Set form validation method in model