Categories
Validation in django?
Good afternoon! how to create a validation for one input field, you need to make sure that it is either a phone of the form +7 xxx xxx xx xx, or a date in the format DD.MM.YYYY or YYYY-MM-DD, or an email?
Answer the question
In order to leave comments, you need to log in
The only thing that comes to mind is to override the check method, and in it check through or, a regular expression match.
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question