ngx-brazilian-helpers
v0.3.0
Published
The easiest and funniest way to validate Brazilian documents such as CPF, CNPJ, NIT (PIS/PASEP), Renavam, Titulo de Eleitor e Inscrição Estaual
Downloads
21
Maintainers
Readme
ngx-brazilian-helpers
Table of Contents
Getting Started
ngx-brazilian-helpers
is the easiest way to validate brazilian documents in angular forms. Following the available validators:
- CPF
- CNPJ
- NIT (PIS/PASEP)
- Renavam
- Titulo de Eleitor
- Inscrição Estadual
- CNS (Carteira Nacional de Saúde)
Usage
Install ngx-brazilian-helpers
via npm
:
npm install ngx-brazilian-helpers --save
Import in your app.module.ts
or any module you want to use it:
import { ValidatorsModule } from 'ngx-brazilian-helpers';
@NgModule({
imports: [
ValidatorsModule.forRoot()
]
})
Using it:
<input id="yourId" name="yourName" ngModel cpf>
or
<input [formControl]='yourControl' cpf>
or
<input formControlName='yourControlName' cpf>