0.3.0 • Published 5 years ago
password-validator-minimalist v0.3.0
Password Validator Minimalist
Validates custom text or desired password with simple options
Installation
npm install password-validator-minimalist --save
Usage example
Import Validator
const validator = require('./index');
Import Validator (EcmaScript 6)
import validator from 'password-validator-minimalist';
Use Validator
let valid = validator.validate('custom@Password123', {
lowercase: true,
uppercase: true,
number: true,
specialChar: true
}, 10);
console.log(valid)
Second argument - Available Options Object
Any of these can be passed into the arguments object for each instance.
Option | Description | Default Value |
---|---|---|
lowercase | Boolean, check for uppercase letters | null |
uppercase | Boolean, check for uppercase letters | null |
number | Boolean, check for numeric letters | null |
specialChar | Boolean, check for special chars (symbols) | null |
Third argument - Minimum length
- By default is 10 chars
Meta
Distributed under the XYZ license. See LICENSE
for more information.