This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function validate_cpf(cpf) { | |
| var sum, summod11; | |
| cpf = cpf.replace(/[^0-9]/g, ''); | |
| if(cpf.length != 11 || cpf.match(/^([0-9])\1+$/)) { | |
| return false; | |
| } | |
| // 9 primeiros digitos do cpf | |
| var digit = Array.prototype.slice.call(cpf, 0, 9); |
NewerOlder