Open DasdWaller opened 3 years ago
@DasdWaller okay, hang on.
@DasdWaller
<template>
<form @keydown="$errors.onKeydown($event)">
<input type='text' v-model='name' :inputClass="errorClass"/>
<error input="name" />
<button @click="submit">Submit</button>
</form>
</template>
<script>
export default {
data(){
return{
name: '',
errorClass: 'form-error'
}
},
methods(){
this.$http.post('/submit', {name: this.name});
},
destroyed () {
this.$errors.flush()
}
}
</script>
I cant understand how to use this package.
This my example code: