ValidateFormat validates a string against a standard format. It returns nil if the string conforms to the format, an error otherwise. The format specification follows the json schema draft 4 validation extension. see Supported formats are:

- "date-time": RFC3339 date time value
- "email": RFC5322 email address
- "hostname": RFC1035 Internet host name
- "ipv4", "ipv6", "ip": RFC2673 and RFC2373 IP address values
- "uri": RFC3986 URI value
- "mac": IEEE 802 MAC-48, EUI-48 or EUI-64 MAC address value
- "cidr": RFC4632 and RFC4291 CIDR notation IP address value
- "regexp": Regular expression syntax accepted by RE2

ValidateFormat is referenced in 7 repositories