Reference: Model rules validation

You are viewing revision #1 of this wiki article.
This version may not be up to date with the latest version.
You may want to view the differences to the latest version.

next (#2) »

  1. How validation works
  2. Validation rules reference
  3. Selected readings

This is a reference to be used for Model rule validation. The documentation 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.

Applys to Yii: 1.0.10

How validation works

The CModel class uses a method named rules to return an array with the rules for validation.

To be continued

Validation rules reference

TODO: Write all references

Selected readings

The Definitive Guide to Yii: Working with Forms - Creating Model
Yii PHP Framework Class Reference - CValidator

Built in validators in Yii

CBooleanValidator
CCaptchaValidator
CCompareValidator
CDefaultValueValidator
CEmailValidator
CExistValidator
CFileValidator
CFilterValidator
CInlineValidator
CNumberValidator
CRangeValidator
CRegularExpressionValidator
CRequiredValidator
CSafeValidator
CStringValidator
CTypeValidator
CUniqueValidator
CUnsafeValidator
CUrlValidator

99 0
114 followers
Viewed: 885 163 times
Version: Unknown (update)
Category: Tutorials
Written by: krillzip
Last updated by: Rodrigo
Created on: Nov 29, 2009
Last updated: 10 years ago
Update Article

Revisions

View all history

Related Articles