UI: user must specify the start of guest vlan range for advanced zone (#7038)

This commit is contained in:
Wei Zhou 2023-01-03 15:50:34 +01:00 committed by GitHub
parent d5f0100541
commit e8aff6f445
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,7 +156,7 @@ export default {
this.formRef.value.validate().then(() => {
const values = toRaw(this.form)
if (!this.checkFromTo(values.vlanRangeStart, values.vlanRangeEnd)) {
if (!values.vlanRangeStart || (values.vlanRangeEnd && !this.checkFromTo(values.vlanRangeStart, values.vlanRangeEnd))) {
this.validStatus = 'error'
this.validMessage = this.$t('message.error.vlan.range')
return
@ -185,7 +185,7 @@ export default {
toVal = value
fromVal = this.form[rule.compare]
}
if (!this.checkFromTo(fromVal, toVal)) {
if (fromVal && toVal && !this.checkFromTo(fromVal, toVal)) {
this.validStatus = 'error'
this.validMessage = this.$t('message.error.vlan.range')
}