我的页面中有 2 个表单。我需要一次验证它们 1,但我认为存在冲突。这里看看:
当我提交任一表单时,它们都显示相同的错误消息
我validation_errors()
用来显示消息。如何一次验证表格 1?
这是代码
public function update_user_info(){
$this->form_validation->set_rules("firstname","First Name","required");
$this->form_validation->set_rules("lastname","Last Name","required");
$this->form_validation->set_rules("middlename","Middle Name","required");
if($this->form_validation->run()===false){
//wrong
}
else { //correct }
}