-
DescriptionI’ve encountered an inconsistency in the structure of the This discrepancy makes it difficult to handle errors uniformly in the application. Versions
Reproduction Steps
{
"0": {
"type": "manual",
"message": { "path": "email", "message": "Invalid email format" }
},
"1": {
"type": "manual",
"message": { "path": "firstName", "message": "first name must be at least 2 characters long" }
}
} Expected BehaviorThe structure of the {
email: { message: "Invalid email format", type: "manual" },
firstName: { message: "first name must be at least 2 characters long", type: "manual" }
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, I realized that the issue I raised was due to an incorrect implementation on my end. Specifically, I was setting the wrong values in the |
Beta Was this translation helpful? Give feedback.
Hi,
I realized that the issue I raised was due to an incorrect implementation on my end. Specifically, I was setting the wrong values in the
setError
function. Instead of passing field names as keys in the errors object, I was using a different structure, which caused the inconsistencies I observed.