Welcome Guest, Not a member yet? Register   Sign In
Validation should work with Array and Objects?
#1

[eluser]Newton Wagner[/eluser]
Hi there again,

Talking about MVC and Validation class with others, I've noted that Validation class should only run at the Controller, because it uses the $_POST array.

In my opinion, validation is a business logic, and should run in a Model class.


What do you think about Validation class works with an Array passed thru the run() method, or something like set_validation_data(Array $data)?

If you do not set anything, by default Validation set this array with the $_POST var. So, we maintain the compatibility.


Sounds good?


Messages In This Thread
Validation should work with Array and Objects? - by El Forum - 01-24-2008, 07:02 AM
Validation should work with Array and Objects? - by El Forum - 01-24-2008, 08:44 AM
Validation should work with Array and Objects? - by El Forum - 01-24-2008, 08:48 AM
Validation should work with Array and Objects? - by El Forum - 01-24-2008, 01:47 PM
Validation should work with Array and Objects? - by El Forum - 01-24-2008, 03:36 PM
Validation should work with Array and Objects? - by El Forum - 01-24-2008, 03:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB