Difference between #3 and #4 of
Add model validator in Controller

Revision #4 has been created by Kostas Apazidis (KonApaz) on Oct 23, 2014, 11:31:13 AM with the memo:

« previous (#3)


Title unchanged

Add model validator in Controller

Category unchanged


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 cannot
ouldn't manipulated 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
1 1
Viewed: 31 132 times
Version: 1.1
Category: Tips
Last updated by: Kostas Apazidis (KonApaz)
Created on: Oct 23, 2014
Last updated: 9 years ago
Update Article


View all history