Difference between #5 and #7 of
Reference: Model rules validation

Revision #7 has been created by mpcabd on Nov 12, 2010, 9:48:27 PM with the memo:

Spelling issues
« previous (#5) next (#8) »


Title unchanged

Reference: Model rules validation

Category unchanged


Yii version unchanged

Tags unchanged

Form validation

Content changed

This is a reference to be used for Model rule validation and is compiled from the Yii documentation and code. The purpose is to have all the information gathered in one place instead of scattered. This reference is not an intro. Applyies to Yii: 1.0.10

## How validation works
The code above is an example of what the [Model::rules()] function may look like. The arrays in the main array each one sets a rule of validation.

### Choi
sce of validators Yii will look for validators in the specifikc order: 1. A method in the model class with the same name as the validator specified. 2. A built-in validator in Yii that extends the CValidator class.
3. A path/alias to a home made CValidator class that is not built in.

### Scenarios

TODO: Write shortly about scenarios.
97 0
Viewed: 771 194 times
Version: 1.1
Category: How-tos
Written by: krillzip
Last updated by: Rodrigo
Created on: Nov 29, 2009
Last updated: 4 years ago
Update Article


View all history