Skip to content

Commit 443f2cc

Browse files
authored
Merge pull request #262 from maximehuran/feature/fix-youtube-validator
2 parents c394ac7 + 832f963 commit 443f2cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Validator/Constraints/YoutubeUrlValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
class YoutubeUrlValidator extends ConstraintValidator
2121
{
22-
public const YOUTUBE_REGEX_VALIDATOR = '`^(?:https?://)?(?:www\.)?(?:youtu.be/|youtube\.com/(?:watch(?:/|/?\?(?:\S*&)?v=)|embed|shorts/))([\w\d-]+)$`';
22+
public const YOUTUBE_REGEX_VALIDATOR = '`^(?:https?://)?(?:www\.)?(?:youtu.be/|youtube\.com/(?:watch(?:/|/?\?(?:\S*&)?v=)|embed/|shorts/))([\w\d-]+)$`';
2323

2424
public function validate(mixed $value, Constraint $constraint): void
2525
{

0 commit comments

Comments
 (0)