mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-31 08:31:09 +00:00
config-tools: add validation to vuart widget
vuart widget don't have empty line check for required fields. Added in this patch. Tracked-On: #7506 Signed-off-by: Wu Zhou <wu.zhou@intel.com>
This commit is contained in:
@@ -9,7 +9,10 @@
|
||||
<label>VM name: </label>
|
||||
</b-col>
|
||||
<b-col md="4">
|
||||
<b-form-select v-model="VUARTConn.endpoint[0].vm_name" :options="vmNames"></b-form-select>
|
||||
<b-form-select :state="validation(VUARTConn.endpoint[0].vm_name)" v-model="VUARTConn.endpoint[0].vm_name" :options="vmNames"></b-form-select>
|
||||
<b-form-invalid-feedback>
|
||||
must have value
|
||||
</b-form-invalid-feedback>
|
||||
</b-col>
|
||||
</b-row>
|
||||
|
||||
@@ -24,7 +27,10 @@
|
||||
<label>VM name: </label>
|
||||
</b-col>
|
||||
<b-col md="4">
|
||||
<b-form-select v-model="VUARTConn.endpoint[1].vm_name" :options="vmNames"></b-form-select>
|
||||
<b-form-select :state="validation(VUARTConn.endpoint[1].vm_name)" v-model="VUARTConn.endpoint[1].vm_name" :options="vmNames"></b-form-select>
|
||||
<b-form-invalid-feedback>
|
||||
must have value
|
||||
</b-form-invalid-feedback>
|
||||
</b-col>
|
||||
</b-row>
|
||||
|
||||
@@ -33,7 +39,10 @@
|
||||
<label>Type: </label>
|
||||
</b-col>
|
||||
<b-col md="4">
|
||||
<b-form-select v-model="VUARTConn.type" :options="VuartType"></b-form-select>
|
||||
<b-form-select :state="validation(VUARTConn.type)" v-model="VUARTConn.type" :options="VuartType"></b-form-select>
|
||||
<b-form-invalid-feedback>
|
||||
must have value
|
||||
</b-form-invalid-feedback>
|
||||
</b-col>
|
||||
</b-row>
|
||||
|
||||
@@ -143,6 +152,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validation(value) {
|
||||
return value.length != 0;
|
||||
},
|
||||
removeVUARTConnection(index) {
|
||||
this.defaultVal.splice(index, 1);
|
||||
},
|
||||
|
Reference in New Issue
Block a user