diff --git a/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/Virtio/Input.vue b/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/Virtio/Input.vue index ec7ac3f4c..6c747dc22 100644 --- a/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/Virtio/Input.vue +++ b/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/Virtio/Input.vue @@ -17,7 +17,10 @@ Guest virtio input device unique identifier: - + + + An arbitrary-long string with letters, digits, underscores or dashes. + @@ -67,6 +70,7 @@ export default { }, data() { return { + InputConfiguration: this.rootSchema.definitions['VirtioInputConfiguration'], BackendDeviceFileType: this.rootSchema.definitions['VirtioInputConfiguration']['properties']['backend_device_file']['enum'], defaultVal: vueUtils.getPathVal(this.rootFormData, this.curNodePath) }; @@ -89,6 +93,10 @@ export default { } }, methods: { + validateId(value) { + var regexp = new RegExp(this.InputConfiguration.properties.id.pattern); + return (value != null) && regexp.test(value); + }, removeVirtioInput(index) { this.defaultVal.splice(index, 1); },