Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StringIsMetroCode = validation.StringMatch(regexp.MustCompile("^[A-Z]{2}$"), "MetroCode must consist of two capital letters") StringIsEmailAddress = validation.StringMatch(regexp.MustCompile("^[^ @]+@[^ @]+$"), "not valid email address") StringIsPortDefinition = validation.StringMatch( regexp.MustCompile("^(([0-9]+(,[0-9]+){0,9})|([0-9]+-[0-9]+)|(any))$"), "port definition has to be: up to 10 comma sepparated numbers (22,23), range (20-23) or word 'any'") StringIsSpeedBand = validation.StringMatch(regexp.MustCompile("^[0-9]+(MB|GB)$"), "SpeedBand should consist of digit followed by MB or GB") StringIsCountryCode = stringvalidator.RegexMatches(regexp.MustCompile("(?i)^[a-z]{2}$"), "Address country must be a two letter code (ISO 3166-1 alpha-2)") )
Functions ¶
func URLWithScheme ¶ added in v1.33.0
URLWithScheme returns a string validator which ensures that any configured attribute value:
- Is a string, which represents a well-formed URL with host and has a scheme that matches predefined schemes
Null (unconfigured) and unknown (known after apply) values are skipped.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.