dongliao2011 2017-06-28 01:30
浏览 28

在codeigniter 3.1.3中使用WiredDesignz的HMVC时,使用回调验证规则时,本机验证规则不会运行?

I recently noticed this weird bug in CI(3.1.3 but might as well be present in other versions). The navtive validation rules like required, valid_email etc don't run while I use the callback. I've already built a My_Form_validation library to make the callback validation rules work with HMVC. But that seems to create another bug in the form_validation library. For eg. I've the following validation rules setup:

    $this->form_validation->set_rules('email', "Email",'required|valid_email|callback__validate_credentials|callback__check_user_status');

The validation rules should be run in the order they are stated, but the validation rules goes straight to validating the callbacks without checking the "required" and "valid_email" rules. These native validation rules run as they should if I remove the callbacks. Has anybody found a fix around this? Thanx in advance.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 易康econgnition精度验证
    • ¥15 线程问题判断多次进入
    • ¥15 msix packaging tool打包问题
    • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
    • ¥15 python的qt5界面
    • ¥15 无线电能传输系统MATLAB仿真问题
    • ¥50 如何用脚本实现输入法的热键设置
    • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
    • ¥30 深度学习,前后端连接
    • ¥15 孟德尔随机化结果不一致