br_validators
3.1.2, released 5 months ago by natanlimap.com.br
Validation functions and input masks for common Brazilian documents and data.
WASM-ready
What it does
BRValidators provides validation algorithms and TextInputFormatters (masks) for Brazilian data such as CPF, CNPJ, PIX keys, CNH, CEP, phone numbers, and vehicle plates.
AI-written summary of version 3.1.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a Flutter app targeting Brazilian users that requires document validation or formatting.
- You need standard text input formatters for fields like CPF, CNPJ, CEP, and phone numbers.
Skip it when
- Your application does not need to handle Brazilian-specific documents or identifiers.
Strengths
- Supports a wide range of Brazilian documents, including recent standards like alphanumeric CNPJ and PIX keys.
- Includes ready-to-use input formatters for TextField widgets.
- Comprehensive coverage of state-level data like Inscrição Estadual (IE) for all 27 states.
Weaknesses
- Strictly localized to Brazil, offering no utility for international validation or formatting.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
not documented
TextField(
inputFormatters: [BRMasks.cpf],
decoration: const InputDecoration(labelText: 'CPF'),
);Alternatives
Packages that do the same job and could replace br_validators.
- cpf_cnpj_validator
Validate, format, strip and generate Brazilian CPF and CNPJ numbers.
50Compare
Works with
Packages commonly used together with br_validators: ones it builds on, ones built on it, and its own family.