perf: 优化ip正则

This commit is contained in:
“huailei000”
2023-02-08 13:58:29 +08:00
committed by huailei
parent b0731d4fbd
commit 8d3a3587d1

View File

@@ -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')))