Skip to content

Commit d695a2e

Browse files
committed
fix: correct CNPJ validation logic for numeric input handling
1 parent 9590945 commit d695a2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cnpjValidator/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ function cnpjIsValid(
3636
const isCnpjOnlyNumbers: boolean = /^\d+$/.test(cnpj);
3737

3838
if (isCnpjOnlyNumbers) {
39-
return cnpjIsValid2(cnpj, errorMsg);
39+
return cnpjIsValid1(cnpj, errorMsg);
4040
}
4141

42-
return cnpjIsValid1(cnpj, errorMsg);
42+
return cnpjIsValid2(cnpj, errorMsg);
4343
}
4444

4545
export default cnpjIsValid;

0 commit comments

Comments
 (0)