2

I am working on implementing the solution outlined here: How to use custom password validators beside the django auth password validators?

The answer is very helpful except for one aspect: Where do I put the code for the validator?! In AUTH_PASSWORD_VALIDATORS I see the line:

'NAME': registration.validators.CustomPasswortValidator

but how do I put the CustomPasswortValidator method into registration.validators? What even is registration.validators? Where can I find that?

Thank you

purplefloyd
  • 155
  • 1
  • 12

1 Answers1

2

The line below:

'NAME': 'registration.validators.CustomPasswortValidator'

mean that you need to have a registration app, and inside that app there is validators.py file, and inside that file there is a method called CustomPasswortValidator.

So, you can work accordingly by giving your own app name, file name and method name.

halfer
  • 19,824
  • 17
  • 99
  • 186
Astik Anand
  • 12,757
  • 9
  • 41
  • 51