[英]CodeIgniter Form Validation greater_than_equal_to not working
I have this code 我有这个代码
$this->form_validation->set_rules('MinimumSalary', 'Minimum Salary', 'trim|required|min_length[1]|max_length[20]|numeric|greater_than_equal_to[0]');
$this->form_validation->set_rules('MaximumSalary', 'Maximum Salary', 'trim|required|min_length[1]|max_length[20]|numeric|greater_than_equal_to[MinimumSalary]');
and yet it always throws up an error when I enter MinimumSalary = 100 and MaximumSalary = 200, The Maximum Salary field must contain a number greater than or equal to Minimum Salary
但是当我输入MinimumSalary = 100和MaximumSalary = 200时,它总是会引发错误, The Maximum Salary field must contain a number greater than or equal to Minimum Salary
尝试这个
'trim|required|min_length[1]|max_length[20]|numeric|greater_than_equal_to['.$this->input->post('MinimumSalary').']');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.