Is there any benefit to using URLValidator
on a django URLField
in models.py or does the URLField already do all the necessary validation?
Also is it recommended to use it to enforce https?
For example:
from django.core.validators import URLValidator
class Processor(models.Model):
website = models.URLField(
max_length=250,
blank=True,
null=True,
validators=[URLValidator(schemes=['https'])] # Enforce HTTPS
)