form_validation.php in config and conditional validation rules |
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. It is working fine, but some of my rules are conditional on other form fields responses, and I don't know how to integrate those rules into the file's arrays.
Would I make a separate small array for each conditional rule, and place it as a new set of rules outside the main method validation array? Or can I make a part of the main validation array conditional? |
Welcome Guest, Not a member yet? Register Sign In |