Working on a regex for time in the format: H:M:S. (00:00:00)
'Time' => 'regex:/^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)$/',
But getting error: preg_match(): No ending delimiter '/' found
It's much easier to use the date_format validation rule.
e.g.
'timeField' => 'required|date_format:H:i',
Use array for rules instead of string with pipe as separator:
'Time' => array('regex:/^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)$/'),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With