Overview
This node, named 'BR Data Utils', is designed to validate and format Brazilian data such as CPF, CNPJ, phone numbers, and postal codes (CEP). It is useful in scenarios where data integrity and formatting compliance with Brazilian standards are required, for example, validating user input in forms or processing customer data in CRM systems. Specifically, the 'Validar Telefone' operation validates Brazilian phone numbers to check if they are correctly formatted and valid.
Use Case Examples
- Validating a Brazilian phone number input to ensure it meets the required format before saving to a database.
- Checking if a phone number is valid during data import to prevent errors in communication systems.
Properties
| Name | Meaning |
|---|---|
| Valor | The phone number value to be validated or formatted. |
Output
JSON
operation- The operation performed, e.g., 'validarTelefone'.original- The original input value provided for validation.isValid- Boolean indicating if the phone number is valid.masked- The formatted (masked) version of the phone number, if applicable.unmasked- The unformatted (unmasked) version of the phone number, if applicable.error- Error message if validation failed or an unexpected error occurred.
Dependencies
- The node depends on an internal validation utility module for Brazilian data formats, which handles the actual validation logic.
Troubleshooting
- Common issues include invalid input formats that do not conform to Brazilian phone number standards, resulting in 'isValid' being false.
- Unexpected errors during validation will return an error message in the output's 'error' field, which can help diagnose issues such as malformed input or internal processing errors.