• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What's the best way to validate data in both controllers and models, before creating/reading/updating/deleting this data

#6
[eluser]jellysandwich[/eluser]
[quote author="porquero" date="1329827144"]You shoul use CI validation way, so you can validate in controller and model:


http://ellislab.com/codeigniter/user-gui...ation.html[/quote]

^Agreed, you should be using CI's validation library.

If you want to keep it simple, you can put all the validation in the model.

For callback validations, you can use this:

http://ellislab.com/forums/viewthread/205469/


Messages In This Thread
What's the best way to validate data in both controllers and models, before creating/reading/updating/deleting this data - by El Forum - 02-21-2012, 09:37 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.