Currently I have a t.Number
field.
When I call t.validate()
on it, it gives me the following result.errors
:
{
"actual": "James King",
"message": "Invalid value \"James King\" supplied to /user_id: Number",
"path": ["user_id"]
}
Is it possible to modify the output of the t.Number
validation to have:
{
"actual": "James King",
"message": "Oops! The value is invalid",
"path": ["user_id"]
}
Also, am I getting that results.errors
because I am in NODE_ENV
"development"? If so, what results.errors will I get if I am in "production"?