Semantic-UI-React icon indicating copy to clipboard operation
Semantic-UI-React copied to clipboard

Supporting warning and success validation on form fields

Open k-vosswinkel opened this issue 7 years ago • 1 comments

Feature Request

Support for warning and success validation on form fields

Problem description

We have a form where we are doing validation at both the form and field levels, but I can only show warnings and successes at the form level. It would be good to be able to warn users that a field is highly suggested, but not mandatory, for example.

Proposed solution

Support warning and error props/children for Form.Input, Form.TextArea, etc... in the same way we can pass in error={content: 'an error'}

I would love to work on this, but I am a new contributor, so I'm not sure how "beginner friendly" this feature would be.

k-vosswinkel avatar Oct 11 '19 14:10 k-vosswinkel

@k-vosswinkel thank you for your report!

This is likely out of the scope for this project. SUIR provides a library of form components, but we are not opinionated about the tools in which these components are used. SUIR can be used with final-form, formik, redux-form, etc. By separating implementation concerns from the form components themselves, we leave more flexibility for people to make choices about what tool best suits their needs.

In projects where my organization uses SUIR, we have reusable components that are API wrappers around SUIR form components where we can drop them in to one of the above mentioned systems. I'd recommend starting there. If you're unsure where to start, a good place to look for help is Stackoverflow.

brianespinosa avatar Jul 28 '20 18:07 brianespinosa