Answer the question
In order to leave comments, you need to log in
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
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).
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 questionAsk a Question
731 491 924 answers to any question