Skip to content
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

Open
wants to merge 4 commits into
base: release/v0.3.0
Choose a base branch
from
Open

Error as array #18

wants to merge 4 commits into from

Conversation

dmmcinty
Copy link

handling a TODO and updating the documentation

@bobeagan bobeagan changed the base branch from master to release/v0.3.0 April 11, 2018 15:49
Copy link
Contributor

@spruce-bruce spruce-bruce left a 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>
Copy link
Contributor

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.

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 ??

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants