validate-password
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "validate-password", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Strengthen your user's passwords", | ||
@@ -5,0 +5,0 @@ "author": "Mike DeWitt <mdewitt07@gmail.com>", |
@@ -0,10 +1,22 @@ | ||
# Validate Password | ||
> JS password validation for the client and the server. | ||
#JS password validation for the client and the server | ||
[![npm version](https://badge.fury.io/js/validate-password.svg)](https://badge.fury.io/js/validate-password) | ||
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)]() | ||
Enforce stronger passwords for users by checking for uppercase/lowercase letters, numbers, and special characters. | ||
You can also check passwords for certain strings. This is ideal for preventing users from entering their name or email in the password. | ||
Or, you can search the password for common words, to further encourage the user to pick a strong password. | ||
You can also check passwords for certain strings. This is ideal for preventing users from entering their name or email in the password. Or, you can search the password for common words, to further encourage the user to pick a strong password. | ||
##Installation | ||
## Features | ||
- [x] Lowercase verification | ||
- [x] Uppercase verification | ||
- [x] Special Characters verification | ||
- [x] Numbers verification | ||
- [x] Strings that are not allowed verification | ||
## Installation | ||
Install via NPM: | ||
@@ -20,3 +32,3 @@ | ||
``` | ||
```html | ||
<script src="node_modules/validate-password/dist/validate-password.min.js"></script> | ||
@@ -27,3 +39,3 @@ ``` | ||
``` | ||
```javascript | ||
var ValidatePassword = require('validate-password'); | ||
@@ -34,3 +46,3 @@ ``` | ||
``` | ||
```javascript | ||
var validator = new ValidatePassword(); | ||
@@ -43,3 +55,3 @@ ``` | ||
``` | ||
```javascript | ||
var passwordData = validator.checkPassword('aaaaa'); | ||
@@ -53,3 +65,3 @@ | ||
``` | ||
```javascript | ||
var checkPasswordForName = validator.checkPassword('cat123aaBa$%^#$%#$%', ['cat123']); | ||
@@ -68,3 +80,3 @@ | ||
``` | ||
```javascript | ||
var options = { | ||
@@ -86,6 +98,14 @@ enforce: { | ||
## Contribute | ||
We would love for you to contribute to **validate-password**, check the ``LICENSE`` file for more info. | ||
## Meta | ||
Mike DeWitt – [http://devdewitt.com/](http://devdewitt.com/) | ||
Distributed under the MIT license. See ``LICENSE`` for more information. | ||
[https://github.com/mndewitt/validate-password](https://github.com/mndewitt/validate-password) | ||
@@ -130,3 +130,3 @@ module.exports = ValidatePassword; | ||
checkForbiddenStringData.value = forbiddenStrings.some(function(forbiddenString) { | ||
var isForbidden = (upperCasePw.indexOf(forbiddenString.toUpperCase()) > -1) | ||
var isForbidden = (upperCasePw.indexOf(forbiddenString.toUpperCase()) > -1); | ||
@@ -141,2 +141,2 @@ if(isForbidden) { | ||
return checkForbiddenStringData; | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
25298
11
402
105
0