password_validator

import "package:password_validator/password_validator.dart";

A password validator package for Dart

Getting Started

ParametersUsage
uppercaseInteger - Minimum number of uppercase letters
minInteger - Minimum password length
maxInteger - Maximum password length
digitsInteger - Number of digits
blacklistBlacklisted passwords ex. "password", "p4ssw0rd"

Init

PasswordValidator passwordValidator = new PasswordValidator(uppercase: 2, min: 6, digits: 5, blacklist: ["password", "mysecretpassword"]);

Validate password

passwordValidator.validate("password"); => will return false since "password is blacklisted and it doesnt have 5 digits"

Libraries

password_validator