私人领地
摘要: 验证器类:Validate.php <?php namespace framework\library; class Validate { /** * 当前验证规则 * @var array */ protected $rule = []; /** * 验证提示信息 * @var array */ 阅读全文
posted @ 2021-01-27 17:53 狂奔的蜗牛Snails 阅读(410) 评论(0) 推荐(0) 编辑
摘要: 注意事项 1.规定验证器格式 $validate->rule($rule)->message($message)->check($data) 2.验证器思路:需要验证的字段,启用某条规则,验证字段的限定值,它的提示信息 3.返回的错误提示。返回全部错误,或者取一条返回 $data = [ 'name 阅读全文
posted @ 2021-01-27 17:51 狂奔的蜗牛Snails 阅读(116) 评论(0) 推荐(0) 编辑