Why is this regex pattern is wrong?
'url' => 'regex:/^(?:https?:\/\/)?(?:www\.)?(?:youtu.be|youtube.com(?:\/embed\/|/v\/|\/watch\?v=))([\w-]{10,12})/'
How to solve this in laravel validation regex? Thanks.
Asked
Active
Viewed 59 times
-1
1 Answers
0
See here list of Laravel helpers
There is no helper that will help you. Use php function preg_match
You can test your expression here

Adam Pery
- 1,924
- 22
- 21