Laravel Time正则表达式

use*_*936 3 regex validation time laravel

以正则时间处理正则表达式:H:M:S.(00:00:00)

'Time' => 'regex:/^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)$/',
Run Code Online (Sandbox Code Playgroud)

但得到错误: preg_match(): No ending delimiter '/' found

Arv*_*vid 7

使用date_format验证规则要容易得多.

例如

'timeField' => 'required|date_format:H:i',
Run Code Online (Sandbox Code Playgroud)