Opened 6 weeks ago

Closed 3 weeks ago

#35782 closed Cleanup/optimization (fixed)

Password validator custom error messages

Reported by: bcail Owned by: bcail
Component: contrib.auth Version: dev
Severity: Normal Keywords:
Cc: Adam Zapletal Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

We would like to make it easier to customize the error messages raised by password validators.

Instead of having to override whole methods, could we put the error messages on the class as attributes, so we would only have to override that attribute for each class?

See the forum thread for discussion.

Note: ticket 34116 is a related ticket that was closed as wontfix, but it was asking for being able to pass the custom error messages through the settings, which is not what this ticket is suggesting.

Change History (13)

comment:1 by Adam Zapletal, 6 weeks ago

Cc: Adam Zapletal added

comment:2 by Claude Paroz, 6 weeks ago

Component: Uncategorizedcontrib.auth
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization
Version: 5.0dev

Makes sense to me.

comment:3 by bcail, 6 weeks ago

Owner: set to bcail
Status: newassigned

comment:4 by Dmitriy Chukhin, 6 weeks ago

I reviewed the /pull request and confirmed that the change is working; do we need to update anything in the documentation based on the change?

comment:5 by bcail, 6 weeks ago

Has patch: set

comment:6 by Dmitriy Chukhin, 4 weeks ago

The /pull request (including additions to documentation) look good to me, so I approved it.

comment:7 by Sarah Boyce, 4 weeks ago

Patch needs improvement: set

comment:8 by bcail, 4 weeks ago

Patch needs improvement: unset

comment:9 by Sarah Boyce, 3 weeks ago

Patch needs improvement: set

comment:10 by bcail, 3 weeks ago

Patch needs improvement: unset

comment:11 by Sarah Boyce <42296566+sarahboyce@…>, 3 weeks ago

In 80c3697:

Refs #35782 -- Documented the get_help_text methods in password validators.

comment:12 by Sarah Boyce, 3 weeks ago

Triage Stage: AcceptedReady for checkin

comment:13 by Sarah Boyce <42296566+sarahboyce@…>, 3 weeks ago

Resolution: fixed
Status: assignedclosed

In ec7d6903:

Fixed #35782 -- Allowed overriding password validation error messages.

Note: See TracTickets for help on using tickets.
Back to Top