title: Custom async vue-validator breaks validation component
body: <p>I'm trying to perform asynchronous validation for one of my Vue.js components using <a href="https://github.com/vuejs/vue-validator" rel="nofollow">vue-validator</a>, following <a href="http://vuejs.github.io/vue-validator/async.html" rel="nofollow">this example</a>. I'd like to check if the email provided by a user is already taken.</p>
  
  <p>This is the validator implementation I'm currently struggling with:</p>
  
  <pre class="lang-js prettyprint-override"><code>Vue.validator('emailUnique', {
      message: 'this e-mail address has already been taken',
      check: function (val) {
          return Vue.http({
              url: '/validate/email-unique',
              method: 'POST',
              data: {
                  email: val
              }
          }).then(
              function (response) { // success
                  console.log('success');
                  return Promise.resolve();
              },
              function (response) { // error
                  console.log('error');
                  return Promise.reject();
              }
          ).catch(function(error) {
              console.log('catch');
              return Promise.reject();
          });
      }
  });
  </code></pre>
  
  <p>Which I use in my component like so:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div&gt;
  &lt;validator name="userValidator"&gt;
    &lt;form novalidate class="form-group" v-on:submit.prevent="submitUser"&gt;
      &lt;div class="form-group"&gt;
        &lt;label for="email"&gt;E-Mail&lt;/label&gt;
          &lt;input id="email" name="email" type="email" class="form-control"
                 placeholder="jon@greatesthits.com"
                 v-model="user.email" required v-validate:email="{ required: true, email: true, emailUnique: true }"&gt;
          &lt;div class="form-validation-error" v-if="$userValidator.email.required &amp;&amp; $userValidator.email.touched"&gt;
            &lt;span&gt;this field is required&lt;/span&gt;
          &lt;/div&gt;
          &lt;div class="form-validation-error" v-if="$userValidator.email.email &amp;&amp; $userValidator.email.touched"&gt;
            &lt;span&gt;not a valid e-mail address&lt;/span&gt;
          &lt;/div&gt;
          &lt;div class="form-validation-error" v-if="$userValidator.email.emailUnique &amp;&amp; $userValidator.email.touched"&gt;
            &lt;span&gt;this e-mail address has already been taken&lt;/span&gt;
          &lt;/div&gt;
      &lt;/div&gt;
    &lt;/form&gt;
  &lt;/validator&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Unfortunately, this breaks the entire validation object for email:</p>
  
  <pre><code>[Vue warn]: Error when evaluating expression "$userValidator.email.required &amp;&amp; $userValidator.email.touched".
  TypeError: scope.$userValidator.email is undefined
  </code></pre>
  
  <p>If I don't register the <code>emailUnique</code> validator, the other two validation rules work fine.
  Also, the request to <code>/validate/email-unique</code> is posted correctly and receives the expected return value (just a json_encoded response with <code>true/false</code>), and I see the corresponding <code>console.log()</code> output (<code>'success', 'error', 'catch'</code>), so I'm guessing the return value for the check function isn't correct and causes <code>vue-validator</code> to fail.</p>
  
  <p><code>Vue.http</code> does return a <code>Promise</code> though, so according to the docs and the example linked to above this should be fine. I also tried to return <code>true</code> or <code>false</code> from within the <code>.then()</code> clause, yet <code>Vue.http</code> still returns a <code>Promise</code> (which apparently troubles <code>vue-validator</code> -- maybe the <code>Promise</code> object I'm returning is not of the form <code>vue-validator</code> expects?).</p>
  
  <p>Any tipps on this?</p>