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

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 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
3 followers
Viewed: 31 690 times
Version: 1.1
Category: Tips
Last updated by: Kostas Apazidis (KonApaz)
Created on: Oct 23, 2014
Last updated: 10 years ago
Update Article

Revisions

View all history