CNPJ validation with angularjs


I've already managed to make a mask, but I still can't validate if this cnpj exists or not.

what i have today is

 <input id="input-cnpj" name="cnpj" id="cnpj" ng-model="data.cnpj" type="tel" ui-mask="99.999.999/9999-99" ng-click="insereClass()" required>

Does anyone know how I could do this validation? I only found it in Jquery formats


You can use a library called NgCpfCnpj .


<input name="cpf" ng-model="cpf" ng-cpf ui-mask="999.999.999-99" />
myForm.cpf.$valid: {{ myForm.cpf.$valid }}
Scroll to Top