0
如何在codeIgniter中設置驗證規則(如果輸入具有相同的驗證規則,例如在此情況下需要驗證規則)。在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');