S
S
Solliter2017-08-19 13:46:10
Django
Solliter, 2017-08-19 13:46:10

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

1 answer(s)
U
User23, 2017-08-19
@User23

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 your question

Ask a Question

731 491 924 answers to any question