Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/diegoraguiar/ngx-brazilian-helpers

The easiest and funniest way to validate Brazilian documents.
https://github.com/diegoraguiar/ngx-brazilian-helpers

angular angular2 angular4 brazil-documents brazilian brazilian-standards carteira-nacional-de-saude cnpj cns cpf directives inscricao-estadual nit pispasep renavam tituloeleitor validators

Last synced: about 1 month ago
JSON representation

The easiest and funniest way to validate Brazilian documents.

Awesome Lists containing this project

README

        

# ngx-brazilian-helpers

[![npm version](https://badge.fury.io/js/ngx-brazilian-helpers.svg)](https://badge.fury.io/js/ngx-brazilian-helpers) [![Build Status](https://travis-ci.org/diegoraguiar/ngx-brazilian-helpers.svg?branch=master)](https://travis-ci.org/diegoraguiar/ngx-brazilian-helpers) [![Coverage Status](https://coveralls.io/repos/github/diegoraguiar/ngx-brazilian-helpers/badge.svg?branch=master)](https://coveralls.io/github/diegoraguiar/ngx-brazilian-helpers?branch=master) [![Lines of Code](https://sonarcloud.io/api/badges/measure?key=ngx-brazilian-helpers&metric=ncloc)](https://sonarcloud.io/dashboard?id=ngx-brazilian-helpers) [![Bugs](https://sonarcloud.io/api/badges/measure?key=ngx-brazilian-helpers&metric=bugs)](https://sonarcloud.io/dashboard?id=ngx-brazilian-helpers) [![Vulnerabilities](https://sonarcloud.io/api/badges/measure?key=ngx-brazilian-helpers&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=ngx-brazilian-helpers)

## Table of Contents

1. [Getting Started](#getting-started)
2. [Usage](#usage)

# Getting Started

`ngx-brazilian-helpers` is the easiest way to validate brazilian documents in angular forms. Following the available validators:

1. **CPF**
2. **CNPJ**
3. **NIT (PIS/PASEP)**
3. **Renavam**
4. **Titulo de Eleitor**
5. **Inscrição Estadual**
6. **CNS (Carteira Nacional de Saúde)**

## Usage
Install `ngx-brazilian-helpers` via `npm`:
```shell
npm install ngx-brazilian-helpers --save
```

Import in your `app.module.ts` or any module you want to use it:
```ts
import { ValidatorsModule } from 'ngx-brazilian-helpers';

@NgModule({
imports: [
ValidatorsModule.forRoot()
]
})
```

Using it:
```html

or

or

```