Node-RED Provides a node-red node for password validation; checks that a password meets your defined requirements.
Install with node-red Palette Manager or,
Run the following command in your Node-RED user directory - typically ~/.node-red
:
npm install node-red-contrib-password-validator
Password validation; checks that a password meets your defined requirements.
Send a message string with the value you want to validate.
Outputs a message object with the value of your input and if it is valid. If not valid will also list an array of the failed checks
Define the msg name if you wish to change the name displayed on the node.
The number of digits, as an integer, the message string must contain to be valid.
Example: A value of 2 requires that the message has two integers in its string to be valid. A value of 0 requires that the message has no integers in its string to be valid. Leaving the field empty/blank will ignore the validation check, so you can have as many or none in the message string as you want.
The number of letters, as an integer, the message string must contain to be valid.
Example: A value of 2 requires that the message has two integers in its string to be valid. A value of 0 requires that the message has no integers in its string to be valid. Leaving the field empty/blank will ignore the validation check, so you can have as many or none in the message string as you want.
The number of lowercase, as an integer, the message string must contain to be valid.
Example: A value of 2 requires that the message has two integers in its string to be valid. A value of 0 requires that the message has no integers in its string to be valid. Leaving the field empty/blank will ignore the validation check, so you can have as many or none in the message string as you want.
The number of uppercase, as an integer, the message string must contain to be valid.
Example: A value of 2 requires that the message has two integers in its string to be valid. A value of 0 requires that the message has no integers in its string to be valid. Leaving the field empty/blank will ignore the validation check, so you can have as many or none in the message string as you want.
The number of symbols, as an integer, the message string must contain to be valid.
Example: A value of 2 requires that the message has two integers in its string to be valid. A value of 0 requires that the message has no integers in its string to be valid. Leaving the field empty/blank will ignore the validation check, so you can have as many or none in the message string as you want.
The number of spaces, as an integer, the message string must contain to be valid.
Example: A value of 2 requires that the message has two integers in its string to be valid. A value of 0 requires that the message has no integers in its string to be valid. Leaving the field empty/blank will ignore the validation check, so you can have as many or none in the message string as you want.
The minimum length of the string, as an integer, the message string length must be to be valid.
Example: A value of 8 requires that the message length must be at least 8 to be valid. Leaving the field empty/blank will ignore the validation check, so you can have as short of a message string as you want.
The maximum length of the string, as an integer, the message string length must be to be valid.
Example: A value of 10 requires that the message cant be any longer than 10 to be valid. Leaving the field empty/blank will ignore the validation check, so you can have as long of a message string as you want.
[{"id":"73c29dde.c5cc64","type":"password-validator","z":"a9e4b48d.e82d3","property":"payload","name":"","digits":"2","letters":"","lowercase":"","uppercase":"2","symbols":"2","spaces":"0","min":"10","max":"38","x":850,"y":220,"wires":[["7c253a1e.145744"]]},{"id":"86ad8c7f.0fab2","type":"inject","z":"a9e4b48d.e82d3","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":280,"y":200,"wires":[["b64bca70.6254f"]]},{"id":"7c253a1e.145744","type":"debug","z":"a9e4b48d.e82d3","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":260,"wires":[]},{"id":"b64bca70.6254f","type":"change","z":"a9e4b48d.e82d3","name":"msg.payload = &!rf3Pl3YeNSq^a@bloL!a!J","rules":[{"t":"set","p":"payload","pt":"msg","to":"&!rf3Pl3YeNSq^a@bloL!a!J","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":200,"wires":[["73c29dde.c5cc64"]]},{"id":"46bdb6bb.52347","type":"comment","z":"a9e4b48d.e82d3","name":"Good Password","info":"","x":460,"y":160,"wires":[]},{"id":"82f9cef1.16781","type":"inject","z":"a9e4b48d.e82d3","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":280,"y":280,"wires":[["80722e1b.250948"]]},{"id":"80722e1b.250948","type":"change","z":"a9e4b48d.e82d3","name":"msg.payload = password","rules":[{"t":"set","p":"payload","pt":"msg","to":"password","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":280,"wires":[["73c29dde.c5cc64"]]},{"id":"84b6fa87.9ce408","type":"comment","z":"a9e4b48d.e82d3","name":"Bad Password","info":"","x":450,"y":240,"wires":[]}]
Please import this flow as an example of how to use.
Please report bugs and feel free to ask for new features directly on GitHub.
This project is licensed under Apache 2.0 license.
_Need a node? _Need automation work? _Need computers to flip switches?
Contact me at [email protected]
Thanks to Tarun Batra AKA tarunbatra for his work on password-validator. It made making this node for node-red possible.
0.0.0 = (majorchange) . (new_feature) . (bugfix-simple_mod)
version 0.2.16 - First Public release
version 0.2.17 - correct documentation linking names in MD file