Revision #4 has been created by Kostas Apazidis (KonApaz) on Oct 23, 2014, 11:31:13 AM with the memo:
syntax
« previous (#3)
Changes
Title
unchanged
Add model validator in Controller
Category
unchanged
Tips
Yii version
unchanged
Tags
unchanged
model, validator, Controller, custom
Content
changed
There are cases that model validators
arshould be depended by controller/action and you c
annot
ouldn't manipulate
d on the model class or using scenarios in easy way
For example, when inserting a new record we want the controller/action to deside whether or not a validator (or more than one) should be applied.
So a robust way to do that is by insert a validator to the model on Controller/action[...]