gil / ng-cpf-cnpj

AngularJS directive to validate CPF/CNPJ numbers.
MIT License
49 stars 28 forks source link

Como integrar ng-cpf-cnpj com ngMessages? #10

Open gledsoncruz opened 8 years ago

gledsoncruz commented 8 years ago

Como usar algo do tipo:

div ng-message="ng-cpf" >CPF inválido !

Obrigado

kevinchevallier commented 8 years ago

We are using the available classes to display or hide error messages: ng-valid-cpf and ng-invalid-cpf. Then use some css that could go like this:

.input-field
    &.ng-invalid-cpf
        &~.input-info-msg
            display: block

If it helps.

biruelrick commented 7 years ago

Is possible to use the ng-cnpj with angular-formly? Are there some example?

Thanks so much

biruelrick commented 7 years ago

I resolved it... http://stackoverflow.com/questions/41128277/i-cant-add-ng-cnpj-directive-using-angular-formly/41148994#41148994

Thanks