This PR add some utilities to format errors with ease. It should facilitate its use in remix-forms but also create an overall more pleasant DX when handling error cases.
Technical details
We dropped the old and undocumented formatErrors and included 2 more generic functions errorsByName and errorsForSchema. For more details check the README diff.
Purpose
This PR add some utilities to format errors with ease. It should facilitate its use in remix-forms but also create an overall more pleasant DX when handling error cases.
Technical details
We dropped the old and undocumented
formatErrors
and included 2 more generic functionserrorsByName
anderrorsForSchema
. For more details check the README diff.