You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(validators): Simplify and refactor password validators
This commit refactors the password validation classes to improve clarity, reduce complexity, and align better with Django conventions.
The key changes include:
- Removed the `BaseCountPasswordValidator` abstract base class, as it added unnecessary complexity. Each validator is now a self-contained class.
- Simplified the logic within each validator, using more direct and efficient methods for character checks (e.g., `isascii()`, `isupper()`).
- Renamed validator classes for conciseness (e.g., `ASCIIOnlyPasswordValidator` to `AsciiValidator`).
- Improved internationalization and pluralization of error messages by using `ngettext`.
- Updated `settings.py` to reflect the new validator class names and their simplified options.
0 commit comments