mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-10 07:26:35 +08:00
fix: 端口校验正则表达式修改 (#1009)
This commit is contained in:
parent
4c39955f2f
commit
06f1d03b93
1 changed files with 1 additions and 1 deletions
|
@ -171,7 +171,7 @@ export function checkPort(value: string): boolean {
|
||||||
if (Number(value) <= 0) {
|
if (Number(value) <= 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const reg = /^([0-9]|[1-9]\d{1,3}|[1-5]\d{4}|6[0-5]{2}[0-3][0-5])$/;
|
const reg = /^([1-9](\d{0,3}))$|^([1-5]\d{4})$|^(6[0-4]\d{3})$|^(65[0-4]\d{2})$|^(655[0-2]\d)$|^(6553[0-5])$/;
|
||||||
if (!reg.test(value) && value !== '') {
|
if (!reg.test(value) && value !== '') {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue