diff --git a/README.md b/README.md index 28f7e159..1890ce02 100644 --- a/README.md +++ b/README.md @@ -106,8 +106,9 @@ validate := validator.New(validator.WithRequiredStructEnabled()) | datauri | Data URL | | fqdn | Full Qualified Domain Name (FQDN) | | hostname | Hostname RFC 952 | -| hostname_port | HostPort | | hostname_rfc1123 | Hostname RFC 1123 | +| hostname_port | HostPort | +| port | Port number | | ip | Internet Protocol Address IP | | ip4_addr | Internet Protocol Address IPv4 | | ip6_addr | Internet Protocol Address IPv6 | diff --git a/doc.go b/doc.go index 91bace77..f202b1bb 100644 --- a/doc.go +++ b/doc.go @@ -1330,6 +1330,12 @@ can be used to validate fields typically passed to sockets and connections. Usage: hostname_port +# Port + +This validates that the value falls within the valid port number range of 1 to 65,535. + + Usage: port + # Datetime This validates that a string value is a valid datetime based on the supplied datetime format.