An error should be reported when regular expressions exist. (#121)
diff --git a/front-end/src/views/management/namespaceIsolations/namespaceIsolationPolicy.vue b/front-end/src/views/management/namespaceIsolations/namespaceIsolationPolicy.vue
index 30a9e8c..8d18351 100644
--- a/front-end/src/views/management/namespaceIsolations/namespaceIsolationPolicy.vue
+++ b/front-end/src/views/management/namespaceIsolations/namespaceIsolationPolicy.vue
@@ -336,7 +336,7 @@
},
handleInputConfirmPrimary() {
const inputValue = this.inputValuePrimary
- if (this.primaryDynamicTags.indexOf(inputValue) > 0) {
+ if (this.primaryDynamicTags.indexOf(inputValue) >= 0) {
this.$notify({
title: 'error',
message: 'This regex exist',
@@ -367,11 +367,11 @@
},
handleInputConfirmNamespace() {
const inputValue = this.inputValueNamespace
- if (this.namespaceDynamicTags.indexOf(inputValue) > 0) {
+ if (this.namespaceDynamicTags.indexOf(inputValue) >= 0) {
this.$notify({
title: 'error',
message: 'This regex exist',
- type: 'success',
+ type: 'error',
duration: 3000
})
return
@@ -398,7 +398,7 @@
},
handleInputConfirmSecondary() {
const inputValue = this.inputValueSecondary
- if (this.secondaryDynamicTags.indexOf(inputValue) > 0) {
+ if (this.secondaryDynamicTags.indexOf(inputValue) >= 0) {
this.$notify({
title: 'error',
message: 'This regex exist',