5.2.1 • Published 5 years ago

joi-zxcvbn v5.2.1

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

NSP Status bitHound Code Build Status

joi-zxcvbn password strength check

Validate Password complexity with Joi and zxcvbn

Usage

npm install --save joi-zxcvbn

or

yarn add joi-zxcvbn
var joiZxcvbn = require('joi-zxcvbn')
var PlainJoi = require('joi');
var Joi = PlainJoi.extend(joiZxcvbn(PlainJoi));

var minimumScore = 3; // default - must in 0...4
var userInputs = ['janedoe', 'jane@doe.com']; // optional & best practice

Joi.string().min(4).zxcvbn(minimumScore, userInputs).validate('👍🐴🔋❤️', function (err) {
  console.log(err ? 'Invalid' : 'Valid')
})

Have a look at the tests.js to see how to parse its results. feedback, score, calc_time are passed trough. calc_time is renamed to calcTime just because.

For configuration options, see dropbox/zxcvbn

5.2.1

5 years ago

5.2.0

5 years ago

5.1.0

5 years ago

5.0.0

5 years ago

4.0.0

7 years ago

3.0.3

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

2.0.2

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago