Skip to content

Commit 7f449a6

Browse files
committed
fix(node): validate address
1 parent 1f17cfa commit 7f449a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def validate_address(cls, v: str) -> str:
6565
return v
6666
except ValueError:
6767
# Regex for domain validation
68-
if re.match(r"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$", v):
68+
if re.match(r"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,14}$", v):
6969
return v
7070
raise ValueError("Invalid address format, must be a valid IPv4/IPv6 or domain")
7171

0 commit comments

Comments
 (0)