Skip to content

red-sight/password-regexp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Password-RegExp

A simple function that generates the RegExp expression for passwords validation.

Installation

npm install password-regexp 

Usage

const regExpPwd = require('../index.js').regExpPwd() regExpPwd.test('abc123') // returns false regExpPwd.test('Strong12') // returns true

Options

By default, it generates a RegExp, that check a string value that match:

  • at least, 1 numeric character
  • at least, 1 uppercase letter
  • at least, 1 lowercase letter
  • min 8, max 32 symbols.

These conditions are customizable by function atrributes:

const regExpPwd = require('../index.js').regExpPwd({ min: 12, max: 18, numeric: false, uppercase: false, symbols: true // an option for symbols: ! @ # $ % ^ & })

About

A simple tool for easy creating regexp expression to check the password strength

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published