Welcome Guest, Not a member yet? Register   Sign In
Form Validation Default
#4

I personally disagree with putting form validations in models. Form validations, as stated, are for forms, which is found in a view which is handled by controllers. Database validation in models is fine, but if you are using your models with different apps without a front end, things can get hairy quickly.

For your case though, you can always build different validation rule as a config file and load it that way. If what you're validation is something you can isolate to specific models, then I'd recommend using a library for validating each model object.
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
Reply


Messages In This Thread
Form Validation Default - by edoramedia - 05-22-2016, 12:32 AM
RE: Form Validation Default - by skunkbad - 05-22-2016, 12:40 AM
RE: Form Validation Default - by cartalot - 05-22-2016, 12:06 PM
RE: Form Validation Default - by albertleao - 05-22-2016, 05:23 PM
RE: Form Validation Default - by cartalot - 05-26-2016, 09:49 AM
RE: Form Validation Default - by albertleao - 05-26-2016, 04:29 PM
RE: Form Validation Default - by skunkbad - 05-26-2016, 10:48 AM
RE: Form Validation Default - by mwhitney - 05-26-2016, 02:14 PM
RE: Form Validation Default - by PaulD - 05-26-2016, 09:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB