mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-31 14:38:02 +00:00
perf: 优化ip正则
This commit is contained in:
@@ -18,7 +18,7 @@ export const IpCheck = {
|
|||||||
required: true,
|
required: true,
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
value = value?.trim()
|
value = value?.trim()
|
||||||
if (/^[\w://.?]+$/.test(value)) {
|
if (/^[\w://.?-]+$/.test(value)) {
|
||||||
callback()
|
callback()
|
||||||
} else {
|
} else {
|
||||||
callback(new Error(i18n.t('common.FormatError')))
|
callback(new Error(i18n.t('common.FormatError')))
|
||||||
|
Reference in New Issue
Block a user