i want to change the error style of fastest validator.
copy from fastest validator document
const Validator = require("fastest-validator");
const v = new Validator();
const schema = {
id: { type: "number", positive: true, integer: true },
name: { type: "string", min: 3, max: 255 },
status: "boolean" // short-hand def
};
enter code here
const check = v.compile(schema);
console.log("Second:", check({ id: 2, name: "Adam" }));
/* Returns an array with errors:
[
{
type: 'required',
field: 'status',
message: 'The \'status\' field is required!'
}
]
*/
in the top example the error have some key value but i want this syntax :
[
{
status: 'The \'status\`enter code here`' field is required!',
}
]