Password v1.1.1 Password.Policy.CommonPasswords View Source

Check whether a password figures in the list of most common passwords by Mark Burnett (

To use, simply add it to the list of policies:

use Password, [
iex> MyApp.Password.validate("password")
{:error, [Password.Policy.CommonPasswords]}

iex> MyApp.Password.validate("very unusual password")

List contains only the top passwords with minimum length of 8 characters, so anything shorter won’t produce matches and will pass.