Skip to content

Instantly share code, notes, and snippets.

@sahibalejandro
Last active August 17, 2017 19:25
Show Gist options
  • Save sahibalejandro/13cf182ae303f580072fff1269d1c96b to your computer and use it in GitHub Desktop.
Save sahibalejandro/13cf182ae303f580072fff1269d1c96b to your computer and use it in GitHub Desktop.
<!-- Assign a class when the error is present -->
<input type="email" v-model="user.email" :class="{ 'has-error': form.errors.has('email') }" />
<!-- Display the error message when it's present -->
<p class="error" v-show="form.errors.has('email')" v-text="form.errors.get('email')"></p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment