-
Notifications
You must be signed in to change notification settings - Fork 41
API v4.0.0
Kind: global class
Creates a password-validator schema
Method to validate the password against schema
Kind: instance method of PasswordValidator
Returns: boolean
| array
- Boolean value indicting the validity
of the password as per schema, if 'options.list'
is not set. Otherwise, it returns an array of
property names which failed validations
Param | Type | Description |
---|---|---|
pwd | string |
password to valdiate |
options | object |
optional options to configure validation |
[options.list] | boolean |
asks for a list of validation failures instead of just true/false |
Rule to invert the next applied rules. All the rules applied after 'not' will have opposite effect, until 'has' rule is applied
Kind: instance method of PasswordValidator
Rule to invert the effects of 'not' Apart from that, 'has' is also used to make the api readable and chainable
Kind: instance method of PasswordValidator
Rule to invert the effects of 'not' Apart from that, 'is' is also used to make the api readable and chainable
Kind: instance method of PasswordValidator
Rule to specify a minimum length of the password
Kind: instance method of PasswordValidator
Param | Type | Description |
---|---|---|
num | number |
minimum length |
Rule to specify a maximum length of the password
Kind: instance method of PasswordValidator
Param | Type | Description |
---|---|---|
num | number |
maximum length |
Rule to mendate the presense of digits in the password
Kind: instance method of PasswordValidator
Rule to mendate the presense of letters in the password
Kind: instance method of PasswordValidator
Rule to mendate the presense of uppercase letters in the password
Kind: instance method of PasswordValidator
Rule to mendate the presense of lowercase letters in the password
Kind: instance method of PasswordValidator
Rule to mendate the presense of symbols in the password
Kind: instance method of PasswordValidator
Rule to mendate the presense of space in the password It can be used along with 'not' to not allow spaces in the password
Kind: instance method of PasswordValidator
Rule to whitelist words to be used as password
Kind: instance method of PasswordValidator
Param | Type | Description |
---|---|---|
list | array |
list of values allowed |
❤️ code