I'm doing tests with vuejs and the library VeeValidate which is to validate fields in a form.
I have an example to validate an email field like the following:
<form>
<div class="form-group" :class="{'has-error': errors.has('email') }" >
<label class="control-label" for="email">Email</label>
<input v-model="email" v-validate="email" data-rules="required|email" class="form-control" type="email" placeholder="Email">
<p class="text-danger" v-if="errors.has('email')">{{ errors.first('email') }}</p>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
The problem is that when I do the test in a browser, vue.js does not interpolate the variables and shows something like the following:
{{ errors.first('email') }}
The versions I'm using from vue.js and VeeValidate are the following:
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.2.6/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/vee-validate/2.0.0-beta.25/vee-validate.min.js"></script>
The complete code is in the next gist :
Can someone tell me what the code is missing or what I'm doing wrong?