Skip to content

Commit 113acb3

Browse files
committed
fix lint errors
1 parent 2161f6f commit 113acb3

1 file changed

Lines changed: 0 additions & 31 deletions

File tree

src/index.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -49,34 +49,3 @@ export { Telefone } from "./telefone";
4949
export { Cnh } from "./cnh";
5050
export { Boleto } from "./boleto";
5151
export { Nis } from "./nis";
52-
53-
export const validator = (joi: any) => ({
54-
type: "document",
55-
base: joi.string(),
56-
messages: {
57-
"document.cpf": "CPF inválido",
58-
"document.cnpj": "CNPJ inválido",
59-
},
60-
rules: {
61-
cpf: {
62-
validate(value: any, helpers: any, args: any, options: any) {
63-
if (!Cpf.isValid(value)) {
64-
return helpers.error("document.cpf");
65-
}
66-
67-
return value;
68-
},
69-
},
70-
cnpj: {
71-
validate(value: any, helpers: any, args: any, options: any) {
72-
if (!Cnpj.isValid(value)) {
73-
return helpers.error("document.cnpj");
74-
}
75-
76-
return value;
77-
},
78-
},
79-
},
80-
});
81-
82-
export default validator;

0 commit comments

Comments
 (0)