Skip to content

Adiciona formatter e validator para CNH - #114

Merged
rubensdemelo merged 2 commits into
flutterbootcamp:masterfrom
Adrianogba:feat/cnh
Oct 31, 2026
Merged

rubensdemelo merged 2 commits into
flutterbootcamp:masterfrom
Adrianogba:feat/cnh

Conversation

@Adrianogba

Copy link
Copy Markdown
Contributor

To desenvolvendo outro app que precisa validar a CNH, adicionando na lib tbm.

O número de registro da CNH tem 11 dígitos, sendo os dois últimos verificadores, calculados por módulo 11 com pesos espelhados (9 a 1 no primeiro, 1 a 9 no segundo).

Exemplo: 18718682003

Alterações:

  • Criação do CNHInputFormatter
  • Criação do CNHValidator, com isValid, strip e generate
  • Adição de isCNHValido e gerarCNH na classe UtilBrasilFields

@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.78%. Comparing base (047123a) to head (629d15b).
⚠️ Report is 23 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #114      +/-   ##
==========================================
- Coverage   97.04%   95.78%   -1.27%     
==========================================
  Files          36       42       +6     
  Lines         812      877      +65     
==========================================
+ Hits          788      840      +52     
- Misses         24       37      +13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rubensdemelo
rubensdemelo merged commit 2ab9d4a into flutterbootcamp:master Oct 31, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants