mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-21 13:08:42 +00:00
misc: configurator: Apply pattern check to IVSHMEM name
This patch applies pattern check to IVSHMEM name. Report error if regex does not match. Tracked-On: #7707 Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
This commit is contained in:
parent
11da9e9475
commit
f5fd7be007
@ -16,7 +16,10 @@
|
|||||||
</label>
|
</label>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col md="4">
|
<b-col md="4">
|
||||||
<b-form-input v-model="IVSHMEM_VMO.NAME" placeholder="Any string with no white spaces."/>
|
<b-form-input :state="validateIvshrgName(IVSHMEM_VMO.NAME)" v-model="IVSHMEM_VMO.NAME" placeholder="Must be 1-27 characters and only letters, digits and '_'."/>
|
||||||
|
<b-form-invalid-feedback>
|
||||||
|
Name must be between 1-27 characters and contain only letters, digits and "_".
|
||||||
|
</b-form-invalid-feedback>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
|
|
||||||
@ -189,6 +192,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
validateIvshrgName(value) {
|
||||||
|
var regexp = new RegExp(this.IVSHMEMRegionType.properties.NAME.pattern);
|
||||||
|
return regexp.test(value);
|
||||||
|
},
|
||||||
validation(value) {
|
validation(value) {
|
||||||
return (value != null) && (value.length != 0);
|
return (value != null) && (value.length != 0);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user