How can I set a minimum password length when using the built-in Django auth module?

前端 未结 5 879
南方客
南方客 2021-01-01 21:25

I’m implementing authentication in a Django site using the built-in auth module, including the built-in UserCreationForm.

I’d like to set a minimum length for passwo

5条回答
  •  梦毁少年i
    2021-01-01 22:07

    Subclassing the user creation form sounds like a good approach. You can't enforce it at the database level, since Django only stores a hash of the password.

提交回复
热议问题