Documentation
¶
Overview ¶
Package is provides pure predicates for common string formats.
Index ¶
- func Base64(s string) bool
- func CIDR(s string) bool
- func CIDRv4(s string) bool
- func CIDRv6(s string) bool
- func CreditCard(s string) bool
- func E164(s string) bool
- func Email(s string) bool
- func FQDN(s string) bool
- func HexColor(s string) bool
- func Hostname(s string) bool
- func IP(s string) bool
- func IPv4(s string) bool
- func IPv6(s string) bool
- func JSON(s string) bool
- func JWT(s string) bool
- func Latitude(s string) bool
- func Longitude(s string) bool
- func Luhn(s string) bool
- func MAC(s string) bool
- func Semver(s string) bool
- func TimeZone(s string) bool
- func ULID(s string) bool
- func URI(s string) bool
- func URL(s string) bool
- func UUID(s string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreditCard ¶ added in v0.2.0
CreditCard reports a 12-19 digit card number passing Luhn; spaces and dashes between digit groups are ignored.
func E164 ¶ added in v0.2.0
E164 reports an international phone number in E.164 form (+14155552671).
func FQDN ¶ added in v0.2.0
FQDN reports a fully qualified domain name (requires a TLD, unlike Hostname).
func TimeZone ¶ added in v0.2.0
TimeZone reports an IANA time zone name ("UTC", "Asia/Shanghai"); "Local" and the empty name are rejected as environment-dependent.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.