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

FormField validate passing incorrect value from other FormField in Form #3892

Closed
remjx opened this issue Mar 28, 2020 · 2 comments
Closed

FormField validate passing incorrect value from other FormField in Form #3892

remjx opened this issue Mar 28, 2020 · 2 comments

Comments

@remjx
Copy link

remjx commented Mar 28, 2020

Expected Behavior

FormField validation should be based on its own value

Actual Behavior

FormField is validating value from a different FormField

URL, screen shot, or Codepen exhibiting the issue

Codesandbox demo https://oescm.csb.app/form
Codesandbox code https://codesandbox.io/s/formfield-validation-issue-oescm (see Form component)

Steps to Reproduce

In demo link above,

  1. Click submit before entering any data. It will show "required" for both.
  2. Click CheckBox. It errors here.

If you look at the console logs, it seems to be passing the true from the CheckBox into the validation for the Username FormField. Username FormField expects a string but a boolean is being passed in.

This only happens when the other FormField is left blank.

Your Environment

  • Grommet version: 2.11.2
@ShimiSun
Copy link
Member

Hi buddy, can you move the Grommet version to 2.11.3 and let us know if you still see the problem?

@remjx
Copy link
Author

remjx commented Mar 28, 2020

The behavior is different in 2.11.3 but there is still an issue. I created a new issue here #3896. Closing this one since it is outdated since 2.11.3 release.

@remjx remjx closed this as completed Mar 28, 2020
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

No branches or pull requests

2 participants