File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -106,8 +106,9 @@ validate := validator.New(validator.WithRequiredStructEnabled())
106
106
| datauri | Data URL |
107
107
| fqdn | Full Qualified Domain Name (FQDN) |
108
108
| hostname | Hostname RFC 952 |
109
- | hostname_port | HostPort |
110
109
| hostname_rfc1123 | Hostname RFC 1123 |
110
+ | hostname_port | HostPort |
111
+ | port | Port number |
111
112
| ip | Internet Protocol Address IP |
112
113
| ip4_addr | Internet Protocol Address IPv4 |
113
114
| ip6_addr | Internet Protocol Address IPv6 |
Original file line number Diff line number Diff line change @@ -1330,6 +1330,12 @@ can be used to validate fields typically passed to sockets and connections.
1330
1330
1331
1331
Usage: hostname_port
1332
1332
1333
+ # Port
1334
+
1335
+ This validates that the value falls within the valid port number range of 1 to 65,535.
1336
+
1337
+ Usage: port
1338
+
1333
1339
# Datetime
1334
1340
1335
1341
This validates that a string value is a valid datetime based on the supplied datetime format.
You can’t perform that action at this time.
0 commit comments