|
'user/insert'=>array(
array(
'field' => 'user_name',
'label' => 'lang:th_name',
'rules' => 'required'
),
array(
'field' => 'email',
'label' => 'lang:th_email',
'rules' => 'required|valid_email'
),
array(
'field' => 'password',
'label' => 'lang:th_password',
'rules' => 'required'
),
array(
'field' => 'confirm_pwd',
'label' => 'lang:th_confirm_pwd',
'rules' => 'required|matches[password]'
),
)
验证密码的时候会出现The Confirm field does not match the lang:th_password field.
lang:th_password解析不了
CI_Form_validation类671行原来的是
$message = sprintf($line, $this->_translate_fieldname($row['label']), $param);
改成
$message = sprintf($line, $this->_translate_fieldname($row['label']), $this->_translate_fieldname($param)); |
|