Does disableErrorFlat do anything?
#2032
Unanswered
literalpie
asked this question in
General
Replies: 1 comment
-
|
Yes, Default behavior (
|
disableErrorFlat: false (default) |
disableErrorFlat: true |
|
|---|---|---|
errors |
Flat array of all errors | Flat array of all errors |
errorMap |
Errors may be merged across validators | Each validator key preserved separately |
| Use case | Simple "show all errors" UI | Different styling/placement per validator type |
The naming is confusing — it doesn't disable errors, it disables the flattening of the error map, keeping validator sources distinct.
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The documentation makes it sound like
disableErrorFlatchanges the shape oferrorsand/orerrorMap, but it's not clear to me at all. My understanding is thaterrorsis always flattened anderrorMapalways includes the information about the "trigger" of the error (onChange, onBlur, etc.)Stackblitz showing two fields - with and without the property.
Beta Was this translation helpful? Give feedback.
All reactions