node-red-contrib-br-validations 0.1.0

Validates some Brazilian documents such as CPF, CNPJ and PIS - based on the br-validations library

npm install node-red-contrib-br-validations

A simple Node-Red node that validates some Brazilian documents such as CPF, CNPJ and PIS - heavily based on the br-validations library.

NodeRed NodeJS ESLint

Pre-requisites

Requires Node-Red version 0.16.2 or more recent.

Installation

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

Usage

  1. Set the Document Types to be validates on the node configuration;
  2. Send the message.document to be validated to the BRValidations node;
  3. Connect the success node to the first output (top);
  4. Connect the error node to the second output (bottom);

screen shot 2017-05-22 at 5 02 06 pm

Development

1. Clone the project
$ git clone https://github.com/sciensa/node-red-contrib-br-validations.git
2. Go to the project directory
$ cd node-red-contrib-br-validations
3. Install the dependencies
$ npm install
4. Run the unit tests
$ npm run test:unit
$ npm link
6. Run the node-red and check the node out

Contributing

  1. Follow the Semantic Versioning Specification.
  2. Follow the GitHub Flow.
  3. Follow the 5 Useful Tips For A Better Commit Message article and the How to Write a Git Commit Message post.
  4. Install and use Commitizen.
  5. Bug reports and pull requests are welcome on GitHub.
  6. 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.

License

The node is available as open source under the terms of the MIT License.

Node Info

Version: 0.1.0
Updated 3 months ago
License: MIT

Downloads

0 in the last day
1 in the last week
12 in the last month

Nodes

  • BrValidations

Keywords

  • node-red
  • CPF
  • CNPJ
  • PIS
  • PASEP
  • PIS/PASEP
  • brazilian
  • documents
  • validations
  • br-validations

Maintainers

  • roalcantara

Contributors

  • Aline Castro
  • Rogério R. Alcântara
  • Valter Junior