Answer the question
In order to leave comments, you need to log in
How to check object on save via console?
I have a field in the model:
class User(AbstractBaseUser):
email = models.EmailField(_('user.model.email'), max_length=100, unique=True, validators=['validate_email'])
Answer the question
In order to leave comments, you need to log in
And when saving, validation does not occur. Here's from the documentation:
Note that full_clean() will not be called automatically when you call your model's save() method. You'll need to call it manually when you want to run one-step model validation for your own manually created models.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question