package
1.1.4
Repository: https://github.com/getevo/evo.git
Documentation: pkg.go.dev

# Functions

Alpha check if the string contains only letters (a-zA-Z).
Alphanumeric check if the string contains only letters and numbers.
ASCII check if the string contains ASCII chars only.
Base64 check if a string is base64 encoded.
ByteLength check if the string's length (in bytes) falls in a range.
CreditCard check if the string is a credit card.
DataURI checks if a string is base64 encoded data URI such as an image.
DialString validates the given string for usage with the various Dial() functions.
DNSName will validate the given string as a DNS name.
Email is a constraint to do a simple validation for email addresses, it only check if the string contains "@" and that it is not in the first or last character of the string https://en.wikipedia.org/wiki/Email_address#Valid_email_addresses.
Exists returns whether the given file or directory exists or not.
FilePath check is a string is Win or Unix file path and returns it's type.
Float check if the string is a float.
FullWidth check if the string contains any full-width chars.
HalfWidth check if the string contains any half-width chars.
Hexadecimal check if the string is a hexadecimal number.
Hexcolor check if the string is a hexadecimal color.
InRange returns true if value lies between left and right border.
Int check if the string is an integer.
IP checks if a string is either IP version 4 or 6.
IPv4 check if the string is an IP version 4.
IPv6 check if the string is an IP version 6.
ISBN check if the string is an ISBN (version 10 or 13).
ISBN10 check if the string is an ISBN version 10.
ISBN13 check if the string is an ISBN version 13.
ISO3166Alpha2 checks if a string is valid two-letter country code.
ISO3166Alpha3 checks if a string is valid three-letter country code.
JSON check if the string is valid JSON (note: uses json.Unmarshal).
Latitude check if a string is valid latitude.
Longitude check if a string is valid longitude.
LowerCase check if the string is lowercase.
MAC check if a string is valid MAC address.
MongoID check if the string is a valid hex-encoded representation of a MongoDB ObjectId.
Multibyte check if the string contains one or more multibyte chars.
Natural returns true if value is natural number (positive and whole).
Numeric check if the string contains only numbers.
Port checks if a string represents a valid port.
PrintableASCII check if the string contains printable ASCII chars only.
RequestURI check if the string rawurl, assuming it was received in an HTTP request, is an absolute URI or an absolute path.
RequestURL check if the string rawurl, assuming it was received in an HTTP request, is a valid URL confirm to RFC 3986.
RGBcolor check if the string is a valid RGB color in form rgb(RRR, GGG, BBB).
Semver check if string is valid semantic version.
SSN will validate the given string as a U.S.
StringLength check string's length (including multi byte strings).
UpperCase check if the string is uppercase.
URL check if the string is an URL.
UTFDigit check if the string contains only unicode radix-10 decimal digits.
UTFLetter check if the string contains only unicode letter characters.Similar to IsAlpha but for all languages.
UTFLetterNumeric check if the string contains only unicode letters and numbers.
UTFNumeric check if the string contains only unicode numbers of any kind.
UUID check if the string is a UUID (version 3, 4 or 5).
UUIDv3 check if the string is a UUID version 3.
UUIDv4 check if the string is a UUID version 4.
UUIDv5 check if the string is a UUID version 5.
VariableWidth check if the string contains a mixture of full and half-width chars.
Whole returns true if value is whole number.

# Constants

Unix is *nix OS types.
Unknown is unresolved OS type.
Win is Windows type.

# Variables

ISO3166List based on https://www.iso.org/obp/ui/#search/code/ Code Type "Officially Assigned Codes".

# Structs

ISO3166Entry stores country codes.