Skip to content

Instantly share code, notes, and snippets.

View willianfrancas's full-sized avatar
:octocat:
Learning something...

William F Silva willianfrancas

:octocat:
Learning something...
View GitHub Profile
@willianfrancas
willianfrancas / README.md
Created October 31, 2019 20:20 — forked from odahcam/README.md
Validação de CPF e CNPJ com integração com React Forms, implementado com Angular 6.

Exemplos

Uso com reactive forms

new FormGroup({
    cpfManualLength: new FormControl('', [
        Validators.required,
        Validators.pattern(/^(\d{3}\.){2}\d{3}\-\d{2}$/),
        Validators.minLength(14), // digits + word characters