I Have Defined my all rules in a form_validation file in config file
e.x
$config = array(
'basic' => array(
array(
'field' => 'name',
'label' => 'Name',
'rules' => 'alpha'
),
array(
'field' => 'age',
'label' => 'Age',
'rules' => 'alpha'
),
array(
'field' => 'city',
'label' => 'City',
'rules' => 'alpha'
)
),
'mandate' => array(
array(
'field' => 'name',
'label' => 'Name',
'rules' => 'required'
),
array(
'field' => 'age',
'label' => 'Age',
'rules' => 'required'
),
array(
'field' => 'city',
'label' => 'City',
'rules' => 'required'
),
),
);
$config["submitfinal"] = array_merge($config['basic'], $config['mandate']);
What i have been trying to achieve is there are two buttons in which one button is called (savenow) where when the user presses it, it should validate only for nonempty data and the other button is (save and complete) when the user presses it ,it should validate for non empty as well as other rule sets , so i had two groups defined separately and called them for (savenow feature) and when i try to combine both the groups the validation of basic group seems to be not working
Note: I Have applied validation on the same fieldnames in both the groups can you suggest me like how to go further on implementing save and complete feature.