{"action":"created","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/1356","repository_url":"https://api.github.com/repos/erikras/redux-form","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/1356/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/1356/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/1356/events","html_url":"https://github.com/erikras/redux-form/issues/1356","id":165924924,"number":1356,"title":"Form still get submitted even if having syncErrors","user":{"login":"chaintan17","id":2979072,"avatar_url":"https://avatars.githubusercontent.com/u/2979072?v=3","gravatar_id":"","url":"https://api.github.com/users/chaintan17","html_url":"https://github.com/chaintan17","followers_url":"https://api.github.com/users/chaintan17/followers","following_url":"https://api.github.com/users/chaintan17/following{/other_user}","gists_url":"https://api.github.com/users/chaintan17/gists{/gist_id}","starred_url":"https://api.github.com/users/chaintan17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaintan17/subscriptions","organizations_url":"https://api.github.com/users/chaintan17/orgs","repos_url":"https://api.github.com/users/chaintan17/repos","events_url":"https://api.github.com/users/chaintan17/events{/privacy}","received_events_url":"https://api.github.com/users/chaintan17/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-16T11:16:04Z","updated_at":"2016-07-18T21:37:40Z","closed_at":null,"body":"I use `redux-form/immutable` version v6.0.0-rc.3\r\n\r\nHowever, after i implement it, the form still able to submit even there is a syncError object underneath the form store.\r\n\r\nWhen submit the form, everything goes well, the error of each inptu are shown\r\nbut it won't stop the submit process.\r\n\r\nI track down the library and it look like it didn't have `this.submitPromise`\r\n![image](https://cloud.githubusercontent.com/assets/2979072/16894470/509b9c7c-4b81-11e6-8ad0-6564cfa2f2d5.png)\r\n\r\nI have no idea how to debug more, if you want any other information, please let me know.\r\n\r\nin CustomerForm.js\r\n```\r\nclass CustomerForm extends React.Component { // eslint-disable-line react/prefer-stateless-function\r\n  render() {\r\n    const { handleSubmit, submitting } = this.props;\r\n    console.log(handleSubmit);\r\n    return (\r\n      <form className={styles.customerForm} onSubmit={handleSubmit}>\r\n        <div>\r\n          <label>Full Name: </label>\r\n          <Field component={renderField} type=\"text\" name=\"fullName\" />\r\n        </div>\r\n        <div>\r\n          <label>Phone Number: </label>\r\n          <Field component={renderField} type=\"text\" name=\"phoneNumber\" />\r\n        </div>\r\n        <button type=\"submit\" disabled={submitting}>Submit</button>\r\n      </form>\r\n    );\r\n  }\r\n}\r\n\r\nCustomerForm.propTypes = {\r\n  onSubmit: React.PropTypes.any,\r\n  handleSubmit: React.PropTypes.any,\r\n  submitting: React.PropTypes.any,\r\n  customerDetail: React.PropTypes.object,\r\n};\r\n\r\nCustomerForm = reduxForm({\r\n  form: 'customerDetail',\r\n  validate,\r\n})(CustomerForm);\r\n```\r\n\r\nand in its parent\r\n\r\n```\r\nconst showResults = values =>\r\n  new Promise(resolve => {\r\n    setTimeout(() => {  // simulate server latency\r\n      window.alert(`You submitted:\\n\\n${JSON.stringify(values, null, 2)}`)\r\n      resolve()\r\n    }, 500)\r\n  })\r\n\r\n\r\nexport class Register extends React.Component { // eslint-disable-line react/prefer-stateless-function\r\n  render() {\r\n    return (\r\n      <div className={styles.register}>\r\n        <h1>Register</h1>\r\n        <CustomerForm\r\n          onSubmit={showResults}\r\n          customerDetail={this.props.customerDetail}\r\n        />\r\n      </div>\r\n    );\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/erikras/redux-form/issues/comments/233466936","html_url":"https://github.com/erikras/redux-form/issues/1356#issuecomment-233466936","issue_url":"https://api.github.com/repos/erikras/redux-form/issues/1356","id":233466936,"user":{"login":"igorbarbashin","id":1911427,"avatar_url":"https://avatars.githubusercontent.com/u/1911427?v=3","gravatar_id":"","url":"https://api.github.com/users/igorbarbashin","html_url":"https://github.com/igorbarbashin","followers_url":"https://api.github.com/users/igorbarbashin/followers","following_url":"https://api.github.com/users/igorbarbashin/following{/other_user}","gists_url":"https://api.github.com/users/igorbarbashin/gists{/gist_id}","starred_url":"https://api.github.com/users/igorbarbashin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorbarbashin/subscriptions","organizations_url":"https://api.github.com/users/igorbarbashin/orgs","repos_url":"https://api.github.com/users/igorbarbashin/repos","events_url":"https://api.github.com/users/igorbarbashin/events{/privacy}","received_events_url":"https://api.github.com/users/igorbarbashin/received_events","type":"User","site_admin":false},"created_at":"2016-07-18T21:37:40Z","updated_at":"2016-07-18T21:37:40Z","body":"Hm, looks like you're doing everything right.\r\nThe only thing I might try is to put your validate function the same file with the form. And make sure that you don't have js errors when loading the page. Cause if there's errors, the form is submitting no matter what with a regular \"GET\" method. \r\n\r\nI don't quite get what else could be wrong with your form.\r\n\r\nSomething to do with `validate` function"}}
{"actor":{"display_login":"igorbarbashin"}}