Closed dmytropanontko closed 4 years ago
I'm getting the same error
Same here using Vuejs
import { cpf, cnpj } from 'cpf-cnpj-validator';
const validateCpfCnpj = function (value) {
if (value.length == 11 && cpf.isValid(value)) {
return true;
} else if (value.length == 14 && cnpj.isValid(value)) {
return true;
} else {
return false;
}
}
I made a correction, you can try like this
import J from '@hapi/joi';
import { validator } from 'cpf-cnpj-validator';
const Joi = J.extend(validator);
Hi, I try to use your package on front-end and get the following error
I imported the package in following way: