首页
Profile
Profile
Profile
Profile
Profile

CodeIgniter 表单验证使用自定义函数

2016-01-04 阅读 271
昨天第一次自己写CodeIgniter表单验证的自定义函数,没有一次直接写对,琢磨了下文档写对了, 再此对CodeIgniter表单验证自定义函数做个详细说明 ### 需要记住地方 $this->form_validation->set_rules ( 'password', '用户名', 'trim|required|xss_clean|callback_check_password'); callback_ + 函数名 函数中的错误信息设置 $this->form_validation->set_message('check_password', '密码不正确'); check_password就是 验证规则里面的callback_后跟的名称
更新于 2023年03月28日
 
陕ICP备13008705号-1 Chat Gpt Api