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

Here's a snippet of one of my sets of validation rules (currently in the body of the controller).

PHP Code:
$this->form_validation->set_rules('caseworker_contact''<span>"Contact Case Worker"</span>''required'); 

if (
$this->input->post('caseworker_contact') == 'yes') {
   $this->form_validation->set_rules('caseworker_name''<span>"Case Worker Name"</span>''required');  


It's that conditional rule that I am trying to figure out how to place in the config file.
Reply


Messages In This Thread
RE: form_validation.php in config and conditional validation rules - by webmachine - 01-30-2018, 11:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB