Open ghost opened 5 years ago
protected $rule=[ 'name' => 'require|length:2,20|alphaDash', ]
protected $scene=[ 'test' => ['name'=>'require|number'] ] $validate->scene('test')->check($post); 为何不会走场景验证,使用这种方式覆盖重写规则,怎么没有效果,而且$rule 里面的验证规则也失效了, 版本5.1.28 LTS,请问5.1 是不支持这种写法了吗
5.0 手册场景验证
protected $rule=[ 'name' => 'require|length:2,20|alphaDash', ]
protected $scene=[ 'test' => ['name'=>'require|number'] ] $validate->scene('test')->check($post); 为何不会走场景验证,使用这种方式覆盖重写规则,怎么没有效果,而且$rule 里面的验证规则也失效了, 版本5.1.28 LTS,请问5.1 是不支持这种写法了吗
5.0 手册场景验证