在插入2个或更少的字符时,我似乎似乎没有显示 b-form-invalid-feedback 块。我正在使用Vuejs和Bootstrap-vuejs(Bootstrap-vue):
html:
<b-form @submit="onSubmit">
<b-form-group id="fieldsetHorizontal" horizontal :label-cols="4" breakpoint="md" label="Emri">
<b-form-input id="name"
v-model.trim="patient.name"
:state="$v.patient.name.$dirty ? !$v.patient.name.$error : null"
aria-describedby="input-1-live-feedback">
</b-form-input>
<b-form-invalid-feedback id="input-1-live-feedback">
This is a required field and must be at least 3 characters
</b-form-invalid-feedback>
</b-form-group>
</b-form>
脚本:
validations: {
patient: {
name: {
required,
minLength: minLength(3)
}
}
},