{"id":26908,"library":"django-zxcvbn-password-validator","title":"django-zxcvbn-password-validator","description":"A Django password validator that integrates zxcvbn-python to enforce password strength checks with translatable feedback. Current version 1.6.0, supports Python >=3.6 and Django 2.2+. Maintained on GitHub by pych卉.","status":"active","version":"1.6.0","language":"python","source_language":"en","source_url":"https://github.com/pych卉/django-zxcvbn-password-validator","tags":["django","password-validator","zxcvbn","strength"],"install":[{"cmd":"pip install django-zxcvbn-password-validator","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for validation framework","package":"django","optional":false},{"reason":"Backend strength estimation","package":"zxcvbn-python","optional":false}],"imports":[{"note":"Incorrect module prefix","wrong":"from zxcvbn_password_validator import ZXCVBNValidator","symbol":"ZXCVBNValidator","correct":"from django_zxcvbn_password_validator import ZXCVBNValidator"},{"note":"","wrong":"","symbol":"get_feedback","correct":"from django_zxcvbn_password_validator import get_feedback"}],"quickstart":{"code":"# settings.py\nAUTH_PASSWORD_VALIDATORS = [\n    {\n        'NAME': 'django_zxcvbn_password_validator.ZXCVBNValidator',\n        'OPTIONS': {\n            'min_score': 3,\n            'user_attributes': ('username', 'email', 'first_name', 'last_name')\n        }\n    }\n]","lang":"python","description":"Add the validator to AUTH_PASSWORD_VALIDATORS in Django settings."},"warnings":[{"fix":"Use the validator class path as 'django_zxcvbn_password_validator.ZXCVBNValidator'.","message":"The library is not compatible with Django >=3.2 if you rely on the old password validators format? Actually it works with Django 2.2+ but check your Django version for generic validators support.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"If using Django 4.x, consider switching to the class-based definition: ZXCVBNValidator(min_score=3, user_attributes=(...))","message":"Defining validators via list of strings is deprecated in Django 4.x; use the new tuple format or classes. This library works with the string path format in current versions.","severity":"deprecated","affected_versions":"Django 4.x+ with strict settings"},{"fix":"Ensure custom user model has the fields listed, or omit user_attributes entirely.","message":"The 'user_attributes' option uses Django's User model fields by default; if you have custom user model, provide the actual field names; missing attributes can cause AttributeError.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install django-zxcvbn-password-validator. Then import using: from django_zxcvbn_password_validator import ZXCVBNValidator","cause":"Library not installed or wrong import path.","error":"ModuleNotFoundError: No module named 'django_zxcvbn_password_validator'"},{"fix":"Use the correct dictionary format: {'NAME': 'django_zxcvbn_password_validator.ZXCVBNValidator', 'OPTIONS': {...}}","cause":"Incorrect validator configuration syntax in settings.","error":"KeyError: 'NAME'"},{"fix":"Upgrade Django to at least 1.9 or define AUTH_PASSWORD_VALIDATORS in settings.","cause":"Django version older than 1.9 or missing password validation support.","error":"AttributeError: 'Settings' object has no attribute 'AUTH_PASSWORD_VALIDATORS'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}