Overview
This node, named BR Data Utils, validates and formats Brazilian data such as CPF, CNPJ, phone numbers, cell phones, and postal codes (CEP). It is useful for scenarios where data integrity and formatting compliance with Brazilian standards are required, such as in data entry validation, customer data processing, or form input verification. For example, it can validate if a given CEP (postal code) is correctly formatted and valid.
Use Case Examples
- Validating a Brazilian postal code (CEP) entered by a user to ensure it is correct before processing an order.
- Checking the validity of a CPF number submitted in a registration form to prevent invalid entries.
Properties
| Name | Meaning |
|---|---|
| Valor | The value to be validated or formatted by the selected operation (e.g., a CEP code). |
Output
JSON
operation- The operation performed, e.g., 'validarCep' for validating CEP.original- The original input value provided for validation.isValid- Boolean indicating whether the input value is valid according to the selected operation.masked- The formatted (masked) version of the input value, if applicable.unmasked- The unformatted (unmasked) version of the input value, if applicable.error- Error message if the validation or formatting failed or an unexpected error occurred.
Dependencies
- The node depends on an internal validation utility module for Brazilian data formats, which is abstracted away from the user.
Troubleshooting
- Common issues include providing input values in incorrect formats or unsupported characters, which may cause validation to fail.
- If an unexpected error occurs, the node outputs an error message in the 'error' field to help diagnose the problem.