node-red-contrib-object-validation 1.0.8

Validation of JavaScript objects with the AJV library.

npm install node-red-contrib-object-validation

Node-RED node for validating JavaScript objects using the Validate.js library.

It allows the validation of JavaScript objects using a more user-friendly interface, without the need to write complex constraints in JSON format.

Inputs

: payload (object) : the payload of the message to publish.

Outputs

  1. Standard output : payload (object) : the standard output of the operation.

  2. Standard error : payload (string) : the standard error of the operation.

Details

To validate the same property of an object but with different constraints, you must add each constraint to the list of constraints each time you want to validate that property. You should note that for constraints like 'Equal to property', 'Regular Expression', 'Maximum Length', 'Minimum Length', 'Date', 'IP v4', 'IP v6', 'URL', the property values must strictly be of type 'string'. For the constraints 'In', 'Not In', the values are an array ([ ]).

Examples

Review the node examples for more clarity on how to use it. You can import it in the import menu and search for the node example "node-red-contrib-object-validation" or the json for the site GitHub.

References

Node Info

Version: 1.0.8
Updated 1 week ago
License: ISC
Rating: 5.0 1

Categories

Actions

Downloads

72 in the last week

Nodes

  • object-validation

Keywords

  • node-red
  • validate
  • validator
  • validation
  • object
  • model

Maintainers