{"action":"created","issue":{"url":"https://api.github.com/repos/mui-org/material-ui/issues/12749","repository_url":"https://api.github.com/repos/mui-org/material-ui","labels_url":"https://api.github.com/repos/mui-org/material-ui/issues/12749/labels{/name}","comments_url":"https://api.github.com/repos/mui-org/material-ui/issues/12749/comments","events_url":"https://api.github.com/repos/mui-org/material-ui/issues/12749/events","html_url":"https://github.com/mui-org/material-ui/issues/12749","id":356281418,"node_id":"MDU6SXNzdWUzNTYyODE0MTg=","number":12749,"title":"HTML Validation - `required` attribute in TextField with `select` mode does not work","user":{"login":"bichoymessiha","id":7458863,"node_id":"MDQ6VXNlcjc0NTg4NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/7458863?v=4","gravatar_id":"","url":"https://api.github.com/users/bichoymessiha","html_url":"https://github.com/bichoymessiha","followers_url":"https://api.github.com/users/bichoymessiha/followers","following_url":"https://api.github.com/users/bichoymessiha/following{/other_user}","gists_url":"https://api.github.com/users/bichoymessiha/gists{/gist_id}","starred_url":"https://api.github.com/users/bichoymessiha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bichoymessiha/subscriptions","organizations_url":"https://api.github.com/users/bichoymessiha/orgs","repos_url":"https://api.github.com/users/bichoymessiha/repos","events_url":"https://api.github.com/users/bichoymessiha/events{/privacy}","received_events_url":"https://api.github.com/users/bichoymessiha/received_events","type":"User","site_admin":false},"labels":[{"id":460200815,"node_id":"MDU6TGFiZWw0NjAyMDA4MTU=","url":"https://api.github.com/repos/mui-org/material-ui/labels/component:%20Select","name":"component: Select","color":"ffffff","default":false},{"id":337647829,"node_id":"MDU6TGFiZWwzMzc2NDc4Mjk=","url":"https://api.github.com/repos/mui-org/material-ui/labels/question","name":"question","color":"cccccc","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-02T13:11:29Z","updated_at":"2018-09-02T13:36:29Z","closed_at":"2018-09-02T13:36:29Z","author_association":"NONE","body":"I am using html validation in my project, and I am having trouble setting fields as required.\r\n\r\n- [ ] This is a v1.x issue. <!-- (v0.x is no longer maintained) -->\r\n- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.\r\n\r\n## Expected Behaviour\r\nExactly as normal Textfields, when  I add \"required\" prop to a TextField with \"select\" mode. It should block the submit event and should show html native error \"Field is required\"\r\n\r\n## Current Behaviour\r\nWhen  I add \"required\" prop to a TextField with \"select\" mode. It does not block the submit event nor show html native error \"Field is required\". Although it adds the '*' to the label.\r\nThis is not the case with the normal TextField --> It works as expected.\r\n\r\n## Steps to Reproduce\r\n[![Edit Material demo](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/6jxvvq9463)\r\n\r\nIn this example you will find one normal Textfield and one in select mode, both have required={true}. \r\nIf the Textfield is empty and I validate, an error will be shown, if the Select is empty the form submits normally. I am trying to have the same behaviour as the normal Textfield\r\n\r\n| Tech         | Version |\r\n|--------------|---------|\r\n| Material-UI  | v3.0.1  |\r\n| React        |  v16.4.2  |\r\n| Browser      |    Chrome     |"},"comment":{"url":"https://api.github.com/repos/mui-org/material-ui/issues/comments/417931411","html_url":"https://github.com/mui-org/material-ui/issues/12749#issuecomment-417931411","issue_url":"https://api.github.com/repos/mui-org/material-ui/issues/12749","id":417931411,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzkzMTQxMQ==","user":{"login":"oliviertassinari","id":3165635,"node_id":"MDQ6VXNlcjMxNjU2MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/3165635?v=4","gravatar_id":"","url":"https://api.github.com/users/oliviertassinari","html_url":"https://github.com/oliviertassinari","followers_url":"https://api.github.com/users/oliviertassinari/followers","following_url":"https://api.github.com/users/oliviertassinari/following{/other_user}","gists_url":"https://api.github.com/users/oliviertassinari/gists{/gist_id}","starred_url":"https://api.github.com/users/oliviertassinari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliviertassinari/subscriptions","organizations_url":"https://api.github.com/users/oliviertassinari/orgs","repos_url":"https://api.github.com/users/oliviertassinari/repos","events_url":"https://api.github.com/users/oliviertassinari/events{/privacy}","received_events_url":"https://api.github.com/users/oliviertassinari/received_events","type":"User","site_admin":false},"created_at":"2018-09-02T13:36:29Z","updated_at":"2018-09-02T13:36:29Z","author_association":"MEMBER","body":"@bichoymessiha You have to use the native select if you want to take advantage of the native require validation: https://github.com/mui-org/material-ui/issues/11836#issuecomment-405831045\r\nhttps://codesandbox.io/s/vyjvoqx83"}}
{"actor":{"display_login":"oliviertassinari"}}