{"action":"opened","issue":{"url":"https://api.github.com/repos/fergaldoyle/vue-form/issues/76","repository_url":"https://api.github.com/repos/fergaldoyle/vue-form","labels_url":"https://api.github.com/repos/fergaldoyle/vue-form/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/fergaldoyle/vue-form/issues/76/comments","events_url":"https://api.github.com/repos/fergaldoyle/vue-form/issues/76/events","html_url":"https://github.com/fergaldoyle/vue-form/issues/76","id":251651986,"number":76,"title":"Manually triggering validation","user":{"login":"diachedelic","id":310464,"avatar_url":"https://avatars1.githubusercontent.com/u/310464?v=4","gravatar_id":"","url":"https://api.github.com/users/diachedelic","html_url":"https://github.com/diachedelic","followers_url":"https://api.github.com/users/diachedelic/followers","following_url":"https://api.github.com/users/diachedelic/following{/other_user}","gists_url":"https://api.github.com/users/diachedelic/gists{/gist_id}","starred_url":"https://api.github.com/users/diachedelic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diachedelic/subscriptions","organizations_url":"https://api.github.com/users/diachedelic/orgs","repos_url":"https://api.github.com/users/diachedelic/repos","events_url":"https://api.github.com/users/diachedelic/events{/privacy}","received_events_url":"https://api.github.com/users/diachedelic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-21T12:57:55Z","updated_at":"2017-08-21T12:57:55Z","closed_at":null,"body":"I am making a user registration form, and trying to output a nice error for when the email is already taken - however, I only find that out once I try to submit the form to the server and fail.  I can't figure out how to force revalidation.\r\n\r\n```\r\n{\r\n  data: {\r\n    email: 'exists@blah.com',\r\n    existingEmail: null,\r\n  },\r\n  methods: {\r\n    submit() {\r\n      // try to submit to server, and email exists\r\n      this.existingEmail = this.email\r\n\r\n      // TRIGGER REVALIDATION\r\n    },\r\n    emailExists(value) {\r\n      return value !== this.existingEmail\r\n    },\r\n  }\r\n}\r\n```\r\n```\r\n        <validate :custom=\"{ exists: emailExists }\">\r\n          <field-messages class=\"vf-messages\" name=\"email\">\r\n            <div slot=\"required\">Please enter your email</div>\r\n            <div slot=\"email\">That email address is not valid</div>\r\n            <div slot=\"exists\">\r\n              That email already exists - go to \r\n              <router-link :to=\"{ name: 'login' }\">login</router-link>\r\n            </div>\r\n          </field-messages>\r\n\r\n          <input name=\"email\" v-model=\"email\" type=\"email\" placeholder=\"Email\"\r\n            required ref=\"email\" />\r\n        </validate>\r\n```\r\n\r\nAny ideas?"}}
{"actor":{"display_login":"diachedelic"}}