Difference between #5 and #6 of
Understanding "Safe" Validation Rules

Revision #6 has been created by Boaz on Jun 23, 2011, 8:22:12 AM with the memo:

small typo - extra word removed
« previous (#5) next (#7) »


Title unchanged

Understanding "Safe" Validation Rules

Category unchanged


Yii version unchanged

Tags unchanged

Forms, Validation, Safe, Massive Assignment

Content changed

A common source of confusion among new Yii users is how the `'safe'` validator works, how it works with other validators, and why it's necessary in the first place. This article means to clear this up this confusion, as well as explain the notion of Massive Assignment.

Summary: A model's validation rules serve **two** purposes:

1. Insure that fields entered in a form are entered properly
2. Define which form fields are allowed to be assigned to a $model variable
72 0
Viewed: 130 038 times
Version: 1.1
Category: FAQs
Written by: Steve Friedl
Last updated by: Gismo
Created on: Mar 22, 2011
Last updated: 5 years ago
Update Article


View all history