Is there ny way to greater_than/less_than checking with using callback function in CI 3.0.
I have two fields about course fess.
$one-time-pay=10,000
$instalment_pay =12,000
I want installment pay always will be greater than onetime payment.
Please help me.
Thanks
Code:
public $rules = array(
'name' => array(
'field' => 'name',
'label' => 'Course',
'rules' => 'trim|required',
'errors' => array(
'one_time_payment' => array(
'field' => 'one_time_payment',
'label' => 'Onetime Payment',
'rules' => 'trim|required|integer',
'errors' => array(
'required' =>"Please enter Onetime Pay Amount",
),
),
'installment_payment' => array(
'field' => 'installment_payment',
'label' => 'Installment Payment',
'rules' => 'trim|required|greater_than[one_time_payment').']');,
'errors' => array(
'required' =>"Please enter Installment Amount",
'greater_than'=>'Plase enter some greater value than Onetime payment'
),
),
);