如果输入具有相同的验证规则,如在本例中是必需的,我如何在 codeIgniter 中设置验证规则。
$this->form_validation->set_rules('username', 'Username', 'required');
$this->form_validation->set_rules('password', 'Password', 'required');
$this->form_validation->set_rules('firstname', 'Firstname', 'required');
$this->form_validation->set_rules('middlename', 'Middlename', 'required');
$this->form_validation->set_rules('lastname', 'Lastname', 'required');