1👍
✅
The save()
method doesn’t do any validation for your fields, because they can go in the database when empty. See What happens when you save? The reason an invalid date throws a ValidationError
is because it’s not a date. However, an empty string is still a string and can be stored in the database as such. To force validation, call the full_clean()
method of the model object.
Source:stackexchange.com