Validate campus by calling javascript function

Asked

Viewed 31 times

0

I need to validate the phone campus and CPF, and for that I found the following script https://codepen.io/KingRider/pen/qNxror

But when I play here in JSF it doesn’t work. In that I opened a new tab of codepen.io site and played the same code without changing anything and what happened was that it does not work either.

https://codepen.io/anon/pen/Vydqjw

Take the test.

Can anyone say what it takes to work the same??

2 answers

0


You need to use the external resource Vanillamasker

<script src="https://cdnjs.cloudflare.com/ajax/libs/vanilla-masker/1.1.0/vanilla-masker.min.js"></script>
  • I put it and it’s still not working. I suspect it’s because there’s a warning that the Vmasker global variable has not been declared. As I declare her??

0

Missed adding the CDN vanilla-Masker.min.js, Yes it will work properly.

inserir a descrição da imagem aqui

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/vanilla-masker/1.1.0/vanilla-masker.min.js"></script>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.