-
Notifications
You must be signed in to change notification settings - Fork 41
API v2.2.0
Kind: global class
Creates a password-validator schema
Method to validate the password against schema
Kind: instance method of PasswordSchema
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 PasswordSchema
Rule to invert the effects of 'not' Apart from that, 'has' is also used for decoratvie purposes
Kind: instance method of PasswordSchema
Rule to specify a minimum length of the password
Kind: instance method of PasswordSchema
Param | Type | Description |
---|---|---|
num | number |
minimum length |
Rule to specify a maximum length of the password
Kind: instance method of PasswordSchema
Param | Type | Description |
---|---|---|
num | number |
maximum length |
Rule to mendate the presense of digits in the password
Kind: instance method of PasswordSchema
Rule to mendate the presense of letters in the password
Kind: instance method of PasswordSchema
Rule to mendate the presense of uppercase letters in the password
Kind: instance method of PasswordSchema
Rule to mendate the presense of lowercase letters in the password
Kind: instance method of PasswordSchema
Rule to mendate the presense of symbols in the password
Kind: instance method of PasswordSchema
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 PasswordSchema
❤️ code