Closed simboonlong closed 2 years ago
Construct ajv errors with more hints.
There are currently 2 kinds of error handling going on with the dropzones:
If i'm understanding correctly, the above 2 became coupled at here.
Moving forward, FormErrorBanner / formErrors will be used for ajv related errors, while ErrorMessage / fileErrors will be for file custom errors.
FormErrorBanner
formErrors
ErrorMessage
fileErrors
FYI: Looks like there is another option, with the help of additional library to handle errors at schema side instead 👀.
Before:
After:
Summary
Construct ajv errors with more hints.
Changes
There are currently 2 kinds of error handling going on with the dropzones:
If i'm understanding correctly, the above 2 became coupled at here.
Moving forward,
FormErrorBanner
/formErrors
will be used for ajv related errors, whileErrorMessage
/fileErrors
will be for file custom errors.FYI: Looks like there is another option, with the help of additional library to handle errors at schema side instead 👀.
Before:
After:
Issues