M
M
Michaebuff2021-01-13 20:07:36
Passwords
Michaebuff, 2021-01-13 20:07:36

Whether to enter somewhere the maximum and minimum length of the password?

Hello, I am currently writing a serializer that uses a password field. Actually, this is a field I wrote, inherited from CharField.
In the constructor, before calling the parent's __init__ method, I added the following line:

kwargs['max_length'], kwargs['min_length'] = 127, 8

So the question is: is it necessary to put these numbers somewhere? I mean some settings maybe? Or hardcode right here?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question