-1

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.

1 Answers1

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