Show marking message when empty input

This commit is contained in:
Too
2018-07-01 01:18:07 +08:00
parent 5237f4d94c
commit b9b19f292d
+5 -1
View File
@@ -12,7 +12,7 @@
<el-input v-model="form.marking" :class="{ 'is-invalid': form.errors.has('marking') }" type="text" name="marking" placeholder="Marking Number">
</el-input>
<has-error :form="form" field="marking"/>
<span>
<span v-if="missingMarking()">
* Please contact vendor to get your marking
</span>
</div>
@@ -146,6 +146,10 @@ export default {
} else {
this.$router.push({ name: 'home' })
}
},
missingMarking:function(){
console.log(this.form.marking);
return this.form.marking === undefined || this.form.marking === '';
}
}
}