J
J
jGashington2015-10-15 14:45:43
Django
jGashington, 2015-10-15 14:45:43

How to limit Cyrillic input in Django?

Hello! I'm making a personal account on a django site. Could you tell me how to limit the input of the login and password fields only in Latin characters during registration?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Lebedev, 2015-10-17
@jGashington

In this case, I would not do validation on the server - after POST, in case of an error, the user will have to re-enter all the form data (or did you secure yourself from this?).
I would do everything on the frontend, for example, this library with any regular expression you need (see examples above).

R
Roman Kitaev, 2015-10-15
@deliro

You don't have to do that!
If you really want to hurt users, use validators.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question