I am working on insert data using codeigniter.
Here is the post data array which i get.
Problem: I am sending the app_soft_ids, lang_ids, working_days form my HTML form and so i get that in post as shown in post array here. But codeigniter didn't validate this three values.
How do i validate this three value? codeigniter Shows this Error after validation. I didn't get that how is it possible that i am sending data properly but CI validation still didn't get it.
The Application IDs field is required.
The Langusge IDs field is required.
The Working Days field is required.
Here is my post array.
Array
(
[app_soft_ids] => Array
(
[0] => 66
[1] => 68
)
[lang_ids] => Array
(
[0] => 4
[1] => 5
)
[working_days] => Array
(
[0] => 4
)
[shift] => Y
[status] => O
[expiry_date] => 10/07/2017
)
This is my validation code:
$config = array(
'app_validation' => array(
array(
'field' => 'app_soft_ids',
'label' => 'Application IDs',
'rules' => 'required|numeric'
),
array(
'field' => 'lang_ids',
'label' => 'Langusge IDs',
'rules' => 'required|numeric'
),
array(
'field' => 'working_days',
'label' => 'Working Days',
'rules' => 'required|numeric'
),
array(
'field' => 'shift',
'label' => 'Shift',
'rules' => 'required|trim|max_length[1]|'
)
)
);