genie-password-validator
v4.0.2
Published
Customizable strong password validator for Node.js and web applications.
Downloads
7
Maintainers
Readme
const result = isStrongPassword(password, options);
if (result.isValid) {
console.log("Password is strong and meets all criteria.");
} else {
console.log("Password validation failed. Reasons:");
result.messages.forEach(message => {
console.log(message);
});
}
Configuration Options
You can configure the password validation by specifying the following options in the options
object:
minUppercase: Minimum number of uppercase letters.
minLowercase: Minimum number of lowercase letters.
minDigits: Minimum number of digits.
minSpecialChars: Minimum number of special characters (e.g., !@#$%^&*()_+{}[]:;<>,.?~/-).
minLength: Minimum password length.
License
This package is licensed under the MIT License. Feel free to use and contribute to it.