Skip to content

taknakamu/evaluate-password

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

evaluate-password

Evaluate password strength.

Installation

Include script after the jQuery library

<script src="jquery.evaluatePassword.js" type="text/javascript"></script>

Usage

Need Input Form ID and DIV for PasswordBar

<input type="password" id="login-pass" name="password">
<div class="password-strength" data-target="login-pass"></div>

Create PasswordBar

$("#login-pass").evaluatePassword({
    autoCreateForm: true
});

Configuration

minimum_length

defaults.minimum_length: 8

runOnInit

defaults.runOnInit: true

autoCreateForm

defaults.autoCreateForm: false

dictionaryCheck

Load "dictionary.json"

defaults.dictionaryCheck: true

dictionaryJsonPath

path/to/dictionary.json

defaults.dictionaryJsonPath: "../dictionary.json"

requireStringKind

defaults.requireStringKind: 1

If requireStringKind is 2

  • minimum_length < aaaaaa : string-kind = 1 -> NG
  • minimum_length < aaaA12 : string-kind = 3 -> OK

levels

defaults.levels: { "0": "Too short", "1": ... , "4": "Strong" }

patterns

regular expression

defaults.patterns: [
    "[a-z]", // StringKind 1
    "[A-Z]", // StringKind 2
    "[0-9]",
    "-_"
]

About

Evaluate password strength.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors