From: ShaoHe Feng <shaohef@linux.vnet.ibm.com> Both '-' and '_' are allowed by libvirt, so we should not put extra restrictions. Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> --- ui/js/src/kimchi.network.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/js/src/kimchi.network.js b/ui/js/src/kimchi.network.js index 23930cd..c6e828d 100644 --- a/ui/js/src/kimchi.network.js +++ b/ui/js/src/kimchi.network.js @@ -321,7 +321,7 @@ kimchi.cleanNetworkDialog = function() { kimchi.setupNetworkFormEvent = function() { $("#networkName").on("keyup", function(event) { - $("#networkName").toggleClass("invalid-field", !$("#networkName").val().match(/^[a-zA-Z0-9_]+$/)); + $("#networkName").toggleClass("invalid-field", !$("#networkName").val().match(/^[\-\w]+$/)); kimchi.updateNetworkFormButton(); }); $("#networkTypeIso").on("click", function(event) {