-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
How do I validate forms with Semantic-UI-React #678
Comments
Not yet implemented, see #407 for the latest convo. For now, you'll have to roll your own validation. |
+1 |
For you own validation I can recommend Redux Form. It integrates nicely with Semantic-UI-React. If you need an example I can create a gist for you. |
@mairh I would love to see said example! |
@TrebuhD Here you go https://gist.github.com/mairh/233f6b4ffdbaaed8ec75bb0bef087e8f I tried to explain things as clearly as I could and also divided the code into separate components so that it reusable thought the codebase. You still have to define the |
I just bite the bullet and installed forms.js and jquery. This validation was too good to pass up. |
Just know it will break as soon as React replaces one of the DOM nodes on render. jQuery event listeners will be attached to the old DOM node. I would highly recommend using one of the react libs and implementations suggested in #407. |
That won't happen as I'm writing to the document body. I actually had to add a check to prevent the script from duplicating on re-renders. I really like this form-validation, I hope you guys can implement something similar. |
@doanhuudung Good news, that feature was shipped in 2016 :) Semantic-UI-React !== Semantic-UI The React port (this repo) is jQuery free for the reasons noted. The original repo is a jQuery based implementation. |
I couldn't find documentation for Form Validation on http://react.semantic-ui.com and was hoping someone could point me in the right direction.
Has Form Validation been implemented yet in Semantic-UI-React? If so, are there any usage documents I can look at? If not, do I use normal Semantic UI's form validation or something like formsy-react?
I did look at the RFC: Form Validation #407 (#407) but it seemed like proposals for ideal Form Validation & Form Component.
The text was updated successfully, but these errors were encountered: