Login to follow
CNPJ AlphaNumeric Mask

CNPJ AlphaNumeric Mask (ODC)

Stable version 0.1.0 (Compatible with ODC)
Uploaded on 2 Jan by Leonardo Pires
CNPJ AlphaNumeric Mask

CNPJ AlphaNumeric Mask (ODC)

Details
Detailed Description
  • This component provides a complete solution for CNPJ formatting, input control, and validation, compatible with both the traditional numeric model and the new alphanumeric CNPJ defined by the Brazilian Federal Revenue Service.
  • The official mask is applied in real time, ensuring a consistent and user-friendly typing experience. Cursor behavior is intelligently managed, handling Backspace, Delete, text selection, and navigation across mask separators.
  • Input follows official rules. Only alphanumeric characters are allowed, the last two check digits accept numeric values only, and input is limited to fourteen logical characters regardless of the mask.
  • The component includes client-side validation based on the official modulus eleven algorithm, supporting numeric and alphanumeric CNPJ using base thirty-six calculation.
  • During interaction, the component exposes the formatted CNPJ and the clean CNPJ without mask. Designed for OutSystems applications, it uses JavaScript.