A simple Node-Red node that validates some Brazilian documents such as CPF, CNPJ and PIS - heavily based on the br-validations library.
Requires Node-Red version 0.16.2 or more recent.
Add this line to your package.json file:
"dependencies": {
"node-red-contrib-br-validations": "0.1.0"
}
And then execute:
$ npm install
Or install it yourself as:
$ npm i -S node-red-contrib-br-validations
- Set the Document Types to be validates on the node configuration;
- Send the
message.document
to be validated to the BRValidations node; - Connect the success node to the first output (top);
- Connect the error node to the second output (bottom);
$ git clone https://github.com/sciensa/node-red-contrib-br-validations.git
$ cd node-red-contrib-br-validations
$ npm install
$ npm run test:unit
$ npm link
- Follow the Semantic Versioning Specification.
- Follow the GitHub Flow.
- Follow the 5 Useful Tips For A Better Commit Message article and the How to Write a Git Commit Message post.
- Install and use Commitizen.
- Bug reports and pull requests are welcome on GitHub.
- This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The node is available as open source under the terms of the MIT License.