laravel 使用 tinker及时测试验证规则
$data = [];
$rules = [
'lesson_name' => 'required|unique:stream,stream_name',
'lesson_duration' => ['required','regex:/^[1-9][0-9]{0,1}$/'],
];
$validator = Validator::make($data,$rules,[]);
$validator->passes()
原创
2020-07-08 09:28:08 ·
113 阅读 ·
0 评论