Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter - Doctrine ORM Tutorial : A way of enhancing CI
#16

[eluser]wiredesignz[/eluser]
Just to be clear, form (input) validation in the controller is not the same thing as data validation in your model.

The controller checks and cleans the incoming data and ensures that each field meets a minimum requirement. It should not try to check if the data values are suitable for use by the application.

ie: A login form with username and password should be form validated only to ensure the fields exist and are minimum length etc. Your business logic in the model should then make the comparisons and verify the actual values submitted and give a result back the controller so it knows how to respond to the user input.


Messages In This Thread
CodeIgniter - Doctrine ORM Tutorial : A way of enhancing CI - by El Forum - 11-16-2009, 07:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB