0
var trans = {
amount: $('#container input:first-child').val(),
note: $('#container input:last-child').val()
}; // javascript
trans = {
"amount":"",
"note":"",
} // json
$trans = $this->input->post('trans');
$t = json_decode($trans);
$amount = $t->amount;
$note = $t->note;
$this->form_validation->set_rules('amount', 'Amount', 'required');
Call to a member function set_rules() on a non-object in......
你如何驗證一個JSON對象?
什麼是你想怎麼辦?驗證你的過程是什麼? –