This is a custom validator for [https://github.com/axelson/password-validator/](Password Validator) that implements the https://github.com/dropbox/zxcvbn password scoring algorithm via https://github.com/techgaun/zxcvbn-elixir/.
Add the following to your deps
list in mix.exs
{:password_validator_zxcvbn, "~> 0.1.0"},
iex> opts = [
...> additional_validators: [PasswordValidator.Validators.ZXCVBNValidator],
...> zxcvbn: [min_score: 4]
...> ]
iex> PasswordValidator.validate_password("password", opts)
{:error, ["This is a top-10 common password"]}
- Only https://en.wikipedia.org/wiki/ASCII characters are supported
- Upstream issue: techgaun/zxcvbn-elixir#16