diff options
| author | Ben Cail <bcail@crossway.org> | 2024-10-14 09:12:56 -0400 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-10-15 12:48:45 +0200 |
| commit | 80c3697e96f5a0cbeac043dd5a67f26c076a4279 (patch) | |
| tree | 05378e81796ba8fa0881a5f1d07ea079c8044a1a /docs | |
| parent | 53ea4cce2fd08e84b9cdb6363267ccb9525f7060 (diff) | |
Refs #35782 -- Documented the get_help_text methods in password validators.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/auth/passwords.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/topics/auth/passwords.txt b/docs/topics/auth/passwords.txt index 68f5453d54..e8a662e239 100644 --- a/docs/topics/auth/passwords.txt +++ b/docs/topics/auth/passwords.txt @@ -600,6 +600,11 @@ Django includes four validators: Validates that the password is of a minimum length. The minimum length can be customized with the ``min_length`` parameter. + .. method:: get_help_text() + + A hook for customizing the validator's help text. Defaults to ``"Your + password must contain at least <min_length> characters."`` + .. class:: UserAttributeSimilarityValidator(user_attributes=DEFAULT_USER_ATTRIBUTES, max_similarity=0.7) Validates that the password is sufficiently different from certain @@ -617,6 +622,11 @@ Django includes four validators: ``user_attributes``, whereas a value of 1.0 rejects only passwords that are identical to an attribute's value. + .. method:: get_help_text() + + A hook for customizing the validator's help text. Defaults to ``"Your + password can’t be too similar to your other personal information."`` + .. class:: CommonPasswordValidator(password_list_path=DEFAULT_PASSWORD_LIST_PATH) Validates that the password is not a common password. This converts the @@ -628,10 +638,20 @@ Django includes four validators: common passwords. This file should contain one lowercase password per line and may be plain text or gzipped. + .. method:: get_help_text() + + A hook for customizing the validator's help text. Defaults to ``"Your + password can’t be a commonly used password."`` + .. class:: NumericPasswordValidator() Validate that the password is not entirely numeric. + .. method:: get_help_text() + + A hook for customizing the validator's help text. Defaults to ``"Your + password can’t be entirely numeric."`` + Integrating validation ---------------------- |
