Open jmjoy opened 7 months ago
@jmjoy have you found the answer ? because the errors are in random order for me
@jmjoy have you found the answer ? because the errors are in random order for me
I have already stated the answer in the description.
@jmjoy have you found the answer ? because the errors are in random order for me
I have already stated the answer in the description. so how to get first error
so how to get first error
A PR needs to be submitted to modify the behavior of fields_errors.
I found that I couldn't get the first validation error.
For example , this is my input:
I want to get the first error message when validate failed (if field
key
validated failed, then return the error of fieldkey
, otherwisedisplay_name
, and otherwiseparent_key
) :But unfortunately,
field_errors
returnsHashMap
which is unordered, when the input has multiple field validation errors, the error message will be random.One idea I have is to add a feature
order
and replaceHashMap
withIndexMap
.