-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error as array #18
base: release/v0.3.0
Are you sure you want to change the base?
Error as array #18
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One change - and please add scott as a reviewer also
src/DropNCrop.js
Outdated
@@ -166,7 +167,10 @@ class DropNCrop extends Component { | |||
key="dropzone-validation" | |||
className="dropzone-validation" | |||
> | |||
{value && value.error} | |||
<p>{value && value.error[0]}</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When displaying multiple error messages like this it's more flexible to just loop through all the errors and output them.
{value && value.error && value.error.map(error => <p>{error}</p>}
Also we should have scott review this to make sure he's cool with multiple errors being displayed inside p
tags here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm okay with this? Would love to see what it looks like all validated out. @dmmcinty send me a screenshot ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the line
handling a TODO and updating the documentation