( errors: ReadableErrors )
| 48 | * Each path's messages, by the string of the path. |
| 49 | */ |
| 50 | export const flatMessagesByPath = ( |
| 51 | errors: ReadableErrors |
| 52 | ): Record<string, string[]> => { |
| 53 | const result: Record<string, string[]> = {} |
| 54 | for (const error of errors.issues) |
| 55 | addEntry(result, propStringOf(error), error.message) |
| 56 | return result |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * All path strings at which errors are present mapped to the errors occuring |
no test coverage detected