Material-ui: natively uses for validation (HTML5 spec)

Created on 3 Dec 2017  ·  8Comments  ·  Source: mui-org/material-ui

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior


Mark TextField as an error state when form validation fail

Current Behavior


Do nothing when in an error state

Steps to Reproduce

https://codesandbox.io/s/qk17pp2vlq
image
Edit qk17pp2vlq

Context


I'm looking for a simplest approach to do a validation on my project and I would like to hear some feedback about this way.

I have searched on issues but found nothing about that... sorry if out of topic and please put me on the right way

question

Most helpful comment

@mbrookes The thing is, closing issues to StackOverflow, is basically saying: "you are on your own, we won't help you". As far as I know, nobody from the Material-UI team is answering people questions on StackOverflow.

All 8 comments

For how-to questions and other non-issues, please use gitter or StackOverflow instead of Github issues. There is a StackOverflow tag called "material-ui" that you can use to tag your questions.

This helps us keep issues for... issues. :smile: Thanks!

But since you're here: http://lmgtfy.com/?q=react+validate

@mbrookes Please, don't close issue that quickly.
@milesibastos You can use redux-form as any other form validation library. Also, we have been disabling the native form validation on the demos with form noValidate. So no, it won't happen by magic. It's something you have to do manualy.

@oliviertassinari I linked to a list of options, & closing questions is SOP. 🤷‍♂️

@mbrookes Fair enough.

@mbrookes The thing is, closing issues to StackOverflow, is basically saying: "you are on your own, we won't help you". As far as I know, nobody from the Material-UI team is answering people questions on StackOverflow.

The thing is, closing issues to StackOverflow, is basically saying: "you are on your own, we won't help you"

That's a straw man. Providing help (albeit minimal, and tongue in cheek 😆) and reminding the preferred route for questions (as requested in the README.md and SUPPORT.md, and the FAQ and Community pages in the docs) is not saying "you're on your own", it's saying there are preferred places to get help in the future.

Aside from trying to keep the issue tracker for bugs and feature requests (not my policy, but it makes sense), issues are not a good resource for discoverability of previously answered questions. (For example I know this one has been asked and answered before.)

Perhaps If we ask fo the question to be copied to SO, and linked from the issue here, then we can answer it there, then close it here.

That way, if someone finds the closed question here, they have a link to the answer; it encourages an SO first approach; and encourages core team participation in answering questions on SO, building up a library of more easily discoverable answers.

Alternatively, if the stance on not using issues for questions has changed (pretty sure it's been that way since I joined), then we need to updated the various references across the docs.

Why do you expect people to make an accounbt on SO.
I don't use SO since a lot of answers are made by unqualified people. Theyt are often just hacks or wrong answers.

It's really sad that this is how you expect good software to be made.

Just my 10 cents. Don't take it personally.

Native HTML5 validation should work with the components. I'm not sure I follow the problem here. You have two options:

  1. You use the browser input validation mechanism
  2. You use one of the client form libraries we document: https://material-ui.com/demos/text-fields/#complementary-projects.

What am I missing?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FranBran picture FranBran  ·  3Comments

zabojad picture zabojad  ·  3Comments

revskill10 picture revskill10  ·  3Comments

TimoRuetten picture TimoRuetten  ·  3Comments

ryanflorence picture ryanflorence  ·  3Comments