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

(02-02-2018, 12:26 PM)Elias Wrote: You can move simple part of validation rules definitions to config and in controller getting this config item and do array_merge with hard validations rules. Or you can hold custom validations methods in you controller and hold all validation rules in config file with definitions with 'callback_' prefix.

That sounds like something I would like to do - but I'm not familiar with how those two suggestions would be coded. Could you please include some code showing the use of array_merge here, or the use of the callback_ prefix? i can also leave a comment in the controller guiding other developers to the config file where they can find the main validation rules.
Reply


Messages In This Thread
RE: form_validation.php in config and conditional validation rules - by webmachine - 02-02-2018, 03:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB