一个快速的家伙,我分别对用户名和电子邮件输入字段有相同的(ish)表单验证规则,我需要单独设置规则的消息。我怎么做?
**CODE**
$this->form_validation->set_rules('username','Username', 'trim|required|xss_clean|min_length[2]|is_unique[users.username]');
$this->form_validation->set_rules('email','Email', 'trim|required|valid_email|xss_clean|is_unique[users.email]');
我试图在这里覆盖“is_unique”的消息,
$this->form_validation->set_message('is_unique','Username taken');
我如何设置电子邮件的消息?