url-validation

Why using validators=[URLValidator] when defining a model CharField doesn't make it check for URL-validity upon saving the corresponding ModelForm?

Why using validators=[URLValidator] when defining a model CharField doesn't make it check for URL-validity upon saving the corresponding ModelForm? Question: app.models.py: from django.core.validators import URLValidator from django.db import models class Snapshot(models.Model): url = models.CharField(max_length=1999, validators=[URLValidator]) app.forms.py: from django import forms from .models import Snapshot class SnapshotForm(forms.ModelForm): class Meta: model = Snapshot fields = (‘url’,) app.views.py: …

Total answers: 1