ncc

ng-cpf-cnpj-validate

This package contains two directives to validate the brazilians CPF and CNPJ documents.

Showing:

Popularity

Downloads/wk

43

Maintenance

No Maintenance Data Available

Package

Dependencies

0

Size (min+gzip)

0.7KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

ng-cpf-cnpj-validate

This package contains two directives to validate the brazilians CPF and CNPJ documents.

Installing

To install the component just:

$ bower install ng-cpf-cnpj-validate --save

Then, include the necessary files into your index.html as the example below:

    <script src="bower_components/ng-cpf-cnpj-validate/validate-cpf-directive.js"></script>
    <script src="bower_components/ng-cpf-cnpj-validate/validate-cnpj-directive.js"></script>

##Usage

After that, you can import the new directive using 'validate-cpf' or 'validate-cnpj' to the <input /> as the example below:

<input name="cpf" type="text" class="form-control" ng-model="user.cpf" validate-cpf required ng-disabled="isEdit && user.cpf">

Options

You can use this with ui-mask component too, like:

<input name="cpf" type="text" class="form-control" ng-model="user.cpf" validate-cpf ui-mask="999.999.999-99" required ng-disabled="isEdit && user.cpf">

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100