【发布时间】:2013-02-03 11:03:14
【问题描述】:
当我尝试使用以下语句在 CodeIgniter 中的 from_validation 库下为错误设置自定义消息时..
$this->form_validation->set_message("is_unique", "%s already registered. Try a different %s");
我得到的是Username already registered. Try a different users.username,而不是Username already registered. Try a different Username
虽然文档说If you include %s in your error string, it will be replaced with the "human" name you used for your field when you set your rules.
请让我摆脱困境。
【问题讨论】: