Validation criteria:
The fourth element of the rule, which is verified when the condition is met, provides a total of three preset values:
Presence: equivalent to Isset () authentication:self::exists_validate, 0 (default = 0);
Value is not NULL verified: equivalent to!emtpy (): Self::value_validate, 2;
Must verify: equivalent: if (true), self::must_validate, 1;
Validation time (Validate custom business logic):
Operational level ( business logic level )
The sixth element of a rule.
Three opportunities are available:
Whether the array has a primary key value to judge
Self::model_insert or 1 new data when validating, $model->add () method validation
Self::model_update or 2 edit data when validating, $model->save (), there are primary key values in the array
Self::model_both or 3 is verified in all cases (default).
Validation conditions and validation opportunities