Welcome Guest, Not a member yet? Register   Sign In
form_validation.php in config and conditional validation rules
#6

(01-31-2018, 01:02 PM)webmachine Wrote:
(01-30-2018, 12:13 PM)Narf Wrote:
(01-30-2018, 09:42 AM)webmachine Wrote: I have made a CRM in CodeIgniter that I am working on improving, and want to move all the form validation rules to a form_validation.php file in the config folder.

This is not an improvement. Every developer who has to look at those forms later will hate you for essentially obfuscating the validation logic for them.

I was wondering about that. But the form is very long, and I thought that removing the many validation rules to their own file would streamline the methods and make them more readable. I am quite willing to keep them the way they are, if that is the lesser of two evils.

If there's any evil, this is certainly the lesser one.

Perhaps you have too much other logic mixed in there that should be abstracted away.
Reply


Messages In This Thread
RE: form_validation.php in config and conditional validation rules - by Narf - 01-31-2018, 01:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB