auth.password_validation.validate_password()

validate_password(password, user=None, password_validators=None) [source]

Validates a password. If all validators find the password valid, returns None. If one or more validators reject the password, raises a ValidationError with all the error messages from the validators.

The user object is optional: if it’s not provided, some validators may not be able to perform any validation and will accept any password.

doc_Django
2016-10-09 18:34:28
Comments
Leave a Comment

Please login to continue.