Welcome Guest, Not a member yet? Register   Sign In
Model or Controller - Where to Validate
#5

[eluser]Michael Ekoka[/eluser]
The problem with the validation class is that it looks for custom validation rules inside the controller (callbacks). So whether you load it from the model or from the controller, you still will need to define these custom rules in the controller.

If you have 2 or more controllers handling the same data (the same model), they will each need to implement any of the custom validation rules (either copy/paste or inheritance from a base class that implements these rules).


Messages In This Thread
Model or Controller - Where to Validate - by El Forum - 04-13-2008, 04:21 PM
Model or Controller - Where to Validate - by El Forum - 04-13-2008, 04:28 PM
Model or Controller - Where to Validate - by El Forum - 04-13-2008, 04:32 PM
Model or Controller - Where to Validate - by El Forum - 04-13-2008, 04:50 PM
Model or Controller - Where to Validate - by El Forum - 04-13-2008, 06:04 PM
Model or Controller - Where to Validate - by El Forum - 04-13-2008, 06:42 PM
Model or Controller - Where to Validate - by El Forum - 04-13-2008, 11:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB