6 lines
200 B
Python
6 lines
200 B
Python
from django.core.validators import RegexValidator
|
|
|
|
|
|
class YoutubeURLValidator(RegexValidator):
|
|
regex = r'https?:\/\/(((www.)?youtube.com\/((watch\?v=)|(watch\/)))|(youtu.be\/))([A-z0-9]{1,11}).+'
|