Skip to content

Commit df5c3e6

Browse files
committed
fix nameserver ui validation
1 parent e997f4c commit df5c3e6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

ui/src/views/network/dns/AddDnsServer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
import { getAPI, postAPI } from '@/api'
157157
import TooltipLabel from '@/components/widgets/TooltipLabel'
158158
159-
const FQDN_REGEX = /^(?=.{1,253}$)(?!-)[A-Za-z0-9-]{1,63}(?<!-)(\.[A-Za-z]{2,})+$/
159+
const FQDN_REGEX = /^(?=.{1,253}$)(?:(?!-)[A-Za-z0-9-]{1,63}(?<!-)\.)+[A-Za-z]{2,63}$/
160160
161161
export default {
162162
name: 'AddDnsServer',

ui/src/views/network/dns/UpdateDnsServer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
import { postAPI } from '@/api'
119119
import TooltipLabel from '@/components/widgets/TooltipLabel'
120120
121-
const FQDN_REGEX = /^(?=.{1,253}$)(?!-)[A-Za-z0-9-]{1,63}(?<!-)(\.[A-Za-z]{2,})+$/
121+
const FQDN_REGEX = /^(?=.{1,253}$)(?:(?!-)[A-Za-z0-9-]{1,63}(?<!-)\.)+[A-Za-z]{2,63}$/
122122
123123
export default {
124124
name: 'UpdateDnsServer',

0 commit comments

Comments
 (0)