I am Doing a CodeIgniter form validation using a form_validation file created in the config folder
ex:
$config = array(
'signupBasic' => array(
array(
'field' => 'title',
'label' => 'Title',
'rules' => 'required'
),
array(
'field' => 'firstName',
'label' => 'First Name',
'rules' => 'required'
),
array(
'field' => 'companyName',
'label' => 'Company Name',
'rules' => 'required'
),
array(
'field' => 'addMoreOfficer',
'label' => 'Add More Officers',
'rules' => 'callback_addmore_check'
),
)
);
The Problem is I Have some fields which are to be validated only if the checkbox is checked how can i achieve this using the $config array method