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

modify inputField to support error state #517

Open
dgoldstein1 opened this issue Jul 15, 2019 · 1 comment
Open

modify inputField to support error state #517

dgoldstein1 opened this issue Jul 15, 2019 · 1 comment

Comments

@dgoldstein1
Copy link
Contributor

Component:

Will this modification effect the existing functionality?

  • no modification or deleting of current functionality

Describe your proposed change

  • add prop errorText to inputField to show invalid entry
  • should highlight the box red like the required prop
  • should display red text under the field
@shanberg
Copy link
Contributor

I’m thinking we should define a few validation states for all the form components, and have InputField pass that down as a prop to the InputTextField and whatever other children.

Style for those validation states would be handled in the hintText and InputTextField components individually.

I’m also thinking instead of hintText, we should have help, and that help should be a node, not a string, so that we can include any help text and validation language when necessary, as well as icon like a warning triangle if in error.

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