Open ghost opened 5 months ago
Would you please elaborate with some example? It's not clear now.
As in symfony: https://github.com/symfony/validator/blob/bf0e20ac57f038ef6ea52f83aa474b5f567ff9a1/Constraints/Email.php#L29
Every error has individual code.
Would you please elaborate with some example? It's not clear now.
Example
errors: [
{
"propertyPath": "email",
"message": "Test message",
"code": "inavalid_email"
}
]
I see. That makes sense if client needs to handle errors of a kind in a special way.
Need to decide where exactly the code will be attached to. Will it be a rule / individual error / similar errors (incorrect input, etc.)?
Need to decide where exactly the code will be attached to. Will it be a rule / individual error / similar errors (incorrect input, etc.)?
I think need add individual codes to individual errors. Also need ability change code as in concrete rule as in globally.
Return error code for property validate rules on API application.