I've tried this:export const andorra = { name: 'Andorra', codes: ['AD', 'AND', '20'], // This codes should follow ISO standards (short, long and numeric), but it's your own business calcFn: (vat) => { return vat.length === 10; }, rules: { regex: [/^(AD)(\d{8})$/] } };
and in main file
import { andorra } from "../lib/jsvatCustom/checkNIFAndorra"; //and then: checkVAT(, [andorra])
What i am doing wrong?? I think it doesnt pass the right country to de checker
I've tried this:
export const andorra = { name: 'Andorra', codes: ['AD', 'AND', '20'], // This codes should follow ISO standards (short, long and numeric), but it's your own business calcFn: (vat) => { return vat.length === 10; }, rules: { regex: [/^(AD)(\d{8})$/] } };
and in main fileimport { andorra } from "../lib/jsvatCustom/checkNIFAndorra"; //and then: checkVAT(, [andorra])
What i am doing wrong?? I think it doesnt pass the right country to de checker