DEV Community

Manuel Felipe Arias Pineda
Manuel Felipe Arias Pineda

Posted on

🇻🇪 Venezuela devs: Add Cédula de Identidad to the AI identity standard — Soulprint open source (30 min PR)

🇻🇪 La cédula venezolana no está en Soulprint. ¿La agregas?

const VE: CountryVerifier = {
  countryCode: "VE", countryName: "Venezuela", documentTypes: ["cedula"],
  parse(ocrText: string): DocumentResult {
    const ced = ocrText.match(/([VE]-?\d{7,8})/)?.[1] ?? "";
    return { valid: !!ced, doc_number: ced.replace("-",""), country: "VE" };
  },
  validate(docNumber: string): NumberValidation {
    return { valid: /^[VE]\d{7,8}$/.test(docNumber) };
  },
};
export default VE;
Enter fullscreen mode Exit fullscreen mode

💻 github.com/manuelariasfz/soulprint · Un PR. Un país.

Top comments (0)