Documentation
¶
Index ¶
- type KValidator
- func (t *KValidator) Contains() bool
- func (t *KValidator) ContainsAny() bool
- func (t *KValidator) ContainsRune() bool
- func (t *KValidator) Do(node expr.Node) string
- func (t *KValidator) Excludes() bool
- func (t *KValidator) ExcludesAll() bool
- func (t *KValidator) FieldContains(s string) bool
- func (t *KValidator) FieldExcludes(s string) bool
- func (t *KValidator) HasLengthOf() bool
- func (t *KValidator) HasMaxOf() bool
- func (t *KValidator) HasMinOf() bool
- func (t *KValidator) HasMultiByteCharacter() bool
- func (t *KValidator) IsASCII() bool
- func (t *KValidator) IsAlpha() bool
- func (t *KValidator) IsAlphanum() bool
- func (t *KValidator) IsAlphanumUnicode() bool
- func (t *KValidator) IsBase64() bool
- func (t *KValidator) IsBase64URL() bool
- func (t *KValidator) IsBitcoinAddress() bool
- func (t *KValidator) IsBitcoinBech32Address() bool
- func (t *KValidator) IsCIDR() bool
- func (t *KValidator) IsCIDRv4() bool
- func (t *KValidator) IsCIDRv6() bool
- func (t *KValidator) IsDir() bool
- func (t *KValidator) IsEmail() bool
- func (t *KValidator) IsEq() bool
- func (t *KValidator) IsEthereumAddress() bool
- func (t *KValidator) IsFQDN() bool
- func (t *KValidator) IsFile() bool
- func (t *KValidator) IsGt() bool
- func (t *KValidator) IsGte() bool
- func (t *KValidator) IsHEXColor() bool
- func (t *KValidator) IsHSL() bool
- func (t *KValidator) IsHSLA() bool
- func (t *KValidator) IsHTML() bool
- func (t *KValidator) IsHTMLEncoded() bool
- func (t *KValidator) IsHexadecimal() bool
- func (t *KValidator) IsHostnameRFC1123() bool
- func (t *KValidator) IsHostnameRFC952() bool
- func (t *KValidator) IsIP() bool
- func (t *KValidator) IsIP4Addr() bool
- func (t *KValidator) IsIP4AddrResolvable() bool
- func (t *KValidator) IsIP6Addr() bool
- func (t *KValidator) IsIP6AddrResolvable() bool
- func (t *KValidator) IsIPAddrResolvable() bool
- func (t *KValidator) IsIPv4() bool
- func (t *KValidator) IsIPv6() bool
- func (t *KValidator) IsISBN10() bool
- func (t *KValidator) IsISBN13() bool
- func (t *KValidator) IsLt() bool
- func (t *KValidator) IsLte() bool
- func (t *KValidator) IsMAC() bool
- func (t *KValidator) IsNe() bool
- func (t *KValidator) IsNumber() bool
- func (t *KValidator) IsNumeric() bool
- func (t *KValidator) IsPrintableASCII() bool
- func (t *KValidator) IsRGB() bool
- func (t *KValidator) IsRGBA() bool
- func (t *KValidator) IsSSN() bool
- func (t *KValidator) IsTCP4AddrResolvable() bool
- func (t *KValidator) IsTCP6AddrResolvable() bool
- func (t *KValidator) IsTCPAddrResolvable() bool
- func (t *KValidator) IsUDP4AddrResolvable() bool
- func (t *KValidator) IsUDP6AddrResolvable() bool
- func (t *KValidator) IsUDPAddrResolvable() bool
- func (t *KValidator) IsURI() bool
- func (t *KValidator) IsURL() bool
- func (t *KValidator) IsURLEncoded() bool
- func (t *KValidator) IsUUID() bool
- func (t *KValidator) IsUUID3() bool
- func (t *KValidator) IsUUID3RFC4122() bool
- func (t *KValidator) IsUUID4() bool
- func (t *KValidator) IsUUID4RFC4122() bool
- func (t *KValidator) IsUUID5() bool
- func (t *KValidator) IsUUID5RFC4122() bool
- func (t *KValidator) IsUUIDRFC4122() bool
- func (t *KValidator) IsUnixAddrResolvable() bool
- func (t *KValidator) Required() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KValidator ¶
type KValidator struct {
// contains filtered or unexported fields
}
func KValidatorOf ¶
func KValidatorOf(d interface{}) *KValidator
func (*KValidator) Contains ¶
func (t *KValidator) Contains() bool
Contains is the validation function for validating that the field's value contains the text specified within the param.
func (*KValidator) ContainsAny ¶
func (t *KValidator) ContainsAny() bool
ContainsAny is the validation function for validating that the field's value contains any of the characters specified within the param.
func (*KValidator) ContainsRune ¶
func (t *KValidator) ContainsRune() bool
ContainsRune is the validation function for validating that the field's value contains the rune specified within the param.
func (*KValidator) Excludes ¶
func (t *KValidator) Excludes() bool
Excludes is the validation function for validating that the field's value does not contain the text specified within the param.
func (*KValidator) ExcludesAll ¶
func (t *KValidator) ExcludesAll() bool
ExcludesAll is the validation function for validating that the field's value does not contain any of the characters specified within the param.
func (*KValidator) FieldContains ¶
func (t *KValidator) FieldContains(s string) bool
FieldContains is the validation function for validating if the current field's value contains the field specified by the param's value.
func (*KValidator) FieldExcludes ¶
func (t *KValidator) FieldExcludes(s string) bool
FieldExcludes is the validation function for validating if the current field's value excludes the field specified by the param's value.
func (*KValidator) HasLengthOf ¶
func (t *KValidator) HasLengthOf() bool
HasLengthOf is the validation function for validating if the current field's value is equal to the param's value.
func (*KValidator) HasMaxOf ¶
func (t *KValidator) HasMaxOf() bool
HasMaxOf is the validation function for validating if the current field's value is less than or equal to the param's value.
func (*KValidator) HasMinOf ¶
func (t *KValidator) HasMinOf() bool
HasMinOf is the validation function for validating if the current field's value is greater than or equal to the param's value.
func (*KValidator) HasMultiByteCharacter ¶
func (t *KValidator) HasMultiByteCharacter() bool
HasMultiByteCharacter is the validation function for validating if the field's value has a multi byte character.
func (*KValidator) IsASCII ¶
func (t *KValidator) IsASCII() bool
IsASCII is the validation function for validating if the field's value is a valid ASCII character.
func (*KValidator) IsAlpha ¶
func (t *KValidator) IsAlpha() bool
IsAlpha is the validation function for validating if the current field's value is a valid alpha value.
func (*KValidator) IsAlphanum ¶
func (t *KValidator) IsAlphanum() bool
IsAlphanum is the validation function for validating if the current field's value is a valid alphanumeric value.
func (*KValidator) IsAlphanumUnicode ¶
func (t *KValidator) IsAlphanumUnicode() bool
IsAlphanumUnicode is the validation function for validating if the current field's value is a valid alphanumeric unicode value.
func (*KValidator) IsBase64 ¶
func (t *KValidator) IsBase64() bool
IsBase64 is the validation function for validating if the current field's value is a valid base 64.
func (*KValidator) IsBase64URL ¶
func (t *KValidator) IsBase64URL() bool
IsBase64URL is the validation function for validating if the current field's value is a valid base64 URL safe string.
func (*KValidator) IsBitcoinAddress ¶
func (t *KValidator) IsBitcoinAddress() bool
IsBitcoinAddress is the validation function for validating if the field's value is a valid btc address
func (*KValidator) IsBitcoinBech32Address ¶
func (t *KValidator) IsBitcoinBech32Address() bool
IsBitcoinBech32Address is the validation function for validating if the field's value is a valid bech32 btc address
func (*KValidator) IsCIDR ¶
func (t *KValidator) IsCIDR() bool
IsCIDR is the validation function for validating if the field's value is a valid v4 or v6 CIDR address.
func (*KValidator) IsCIDRv4 ¶
func (t *KValidator) IsCIDRv4() bool
IsCIDRv4 is the validation function for validating if the field's value is a valid v4 CIDR address.
func (*KValidator) IsCIDRv6 ¶
func (t *KValidator) IsCIDRv6() bool
IsCIDRv6 is the validation function for validating if the field's value is a valid v6 CIDR address.
func (*KValidator) IsDir ¶
func (t *KValidator) IsDir() bool
IsDir is the validation function for validating if the current field's value is a valid directory.
func (*KValidator) IsEmail ¶
func (t *KValidator) IsEmail() bool
IsEmail is the validation function for validating if the current field's value is a valid email address.
func (*KValidator) IsEq ¶
func (t *KValidator) IsEq() bool
IsEq is the validation function for validating if the current field's value is equal to the param's value.
func (*KValidator) IsEthereumAddress ¶
func (t *KValidator) IsEthereumAddress() bool
IsEthereumAddress is the validation function for validating if the field's value is a valid ethereum address based currently only on the format
func (*KValidator) IsFQDN ¶
func (t *KValidator) IsFQDN() bool
func (*KValidator) IsFile ¶
func (t *KValidator) IsFile() bool
IsFile is the validation function for validating if the current field's value is a valid file path.
func (*KValidator) IsGt ¶
func (t *KValidator) IsGt() bool
IsGt is the validation function for validating if the current field's value is greater than the param's value.
func (*KValidator) IsGte ¶
func (t *KValidator) IsGte() bool
IsGte is the validation function for validating if the current field's value is greater than or equal to the param's value.
func (*KValidator) IsHEXColor ¶
func (t *KValidator) IsHEXColor() bool
IsHEXColor is the validation function for validating if the current field's value is a valid HEX color.
func (*KValidator) IsHSL ¶
func (t *KValidator) IsHSL() bool
IsHSL is the validation function for validating if the current field's value is a valid HSL color.
func (*KValidator) IsHSLA ¶
func (t *KValidator) IsHSLA() bool
IsHSLA is the validation function for validating if the current field's value is a valid HSLA color.
func (*KValidator) IsHTML ¶
func (t *KValidator) IsHTML() bool
func (*KValidator) IsHTMLEncoded ¶
func (t *KValidator) IsHTMLEncoded() bool
func (*KValidator) IsHexadecimal ¶
func (t *KValidator) IsHexadecimal() bool
IsHexadecimal is the validation function for validating if the current field's value is a valid hexadecimal.
func (*KValidator) IsHostnameRFC1123 ¶
func (t *KValidator) IsHostnameRFC1123() bool
func (*KValidator) IsHostnameRFC952 ¶
func (t *KValidator) IsHostnameRFC952() bool
func (*KValidator) IsIP ¶
func (t *KValidator) IsIP() bool
IsIP is the validation function for validating if the field's value is a valid v4 or v6 IP address.
func (*KValidator) IsIP4Addr ¶
func (t *KValidator) IsIP4Addr() bool
func (*KValidator) IsIP4AddrResolvable ¶
func (t *KValidator) IsIP4AddrResolvable() bool
IsIP4AddrResolvable is the validation function for validating if the field's value is a resolvable ip4 address.
func (*KValidator) IsIP6Addr ¶
func (t *KValidator) IsIP6Addr() bool
func (*KValidator) IsIP6AddrResolvable ¶
func (t *KValidator) IsIP6AddrResolvable() bool
IsIP6AddrResolvable is the validation function for validating if the field's value is a resolvable ip6 address.
func (*KValidator) IsIPAddrResolvable ¶
func (t *KValidator) IsIPAddrResolvable() bool
IsIPAddrResolvable is the validation function for validating if the field's value is a resolvable ip address.
func (*KValidator) IsIPv4 ¶
func (t *KValidator) IsIPv4() bool
IsIPv4 is the validation function for validating if a value is a valid v4 IP address.
func (*KValidator) IsIPv6 ¶
func (t *KValidator) IsIPv6() bool
IsIPv6 is the validation function for validating if the field's value is a valid v6 IP address.
func (*KValidator) IsISBN10 ¶
func (t *KValidator) IsISBN10() bool
IsISBN10 is the validation function for validating if the field's value is a valid v10 ISBN.
func (*KValidator) IsISBN13 ¶
func (t *KValidator) IsISBN13() bool
IsISBN13 is the validation function for validating if the field's value is a valid v13 ISBN.
func (*KValidator) IsLt ¶
func (t *KValidator) IsLt() bool
IsLt is the validation function for validating if the current field's value is less than the param's value.
func (*KValidator) IsLte ¶
func (t *KValidator) IsLte() bool
IsLte is the validation function for validating if the current field's value is less than or equal to the param's value.
func (*KValidator) IsMAC ¶
func (t *KValidator) IsMAC() bool
IsMAC is the validation function for validating if the field's value is a valid MAC address.
func (*KValidator) IsNe ¶
func (t *KValidator) IsNe() bool
IsNe is the validation function for validating that the field's value does not equal the provided param value.
func (*KValidator) IsNumber ¶
func (t *KValidator) IsNumber() bool
IsNumber is the validation function for validating if the current field's value is a valid number.
func (*KValidator) IsNumeric ¶
func (t *KValidator) IsNumeric() bool
IsNumeric is the validation function for validating if the current field's value is a valid numeric value.
func (*KValidator) IsPrintableASCII ¶
func (t *KValidator) IsPrintableASCII() bool
IsPrintableASCII is the validation function for validating if the field's value is a valid printable ASCII character.
func (*KValidator) IsRGB ¶
func (t *KValidator) IsRGB() bool
IsRGB is the validation function for validating if the current field's value is a valid RGB color.
func (*KValidator) IsRGBA ¶
func (t *KValidator) IsRGBA() bool
IsRGBA is the validation function for validating if the current field's value is a valid RGBA color.
func (*KValidator) IsSSN ¶
func (t *KValidator) IsSSN() bool
IsSSN is the validation function for validating if the field's value is a valid SSN.
func (*KValidator) IsTCP4AddrResolvable ¶
func (t *KValidator) IsTCP4AddrResolvable() bool
IsTCP4AddrResolvable is the validation function for validating if the field's value is a resolvable tcp4 address.
func (*KValidator) IsTCP6AddrResolvable ¶
func (t *KValidator) IsTCP6AddrResolvable() bool
IsTCP6AddrResolvable is the validation function for validating if the field's value is a resolvable tcp6 address.
func (*KValidator) IsTCPAddrResolvable ¶
func (t *KValidator) IsTCPAddrResolvable() bool
IsTCPAddrResolvable is the validation function for validating if the field's value is a resolvable tcp address.
func (*KValidator) IsUDP4AddrResolvable ¶
func (t *KValidator) IsUDP4AddrResolvable() bool
IsUDP4AddrResolvable is the validation function for validating if the field's value is a resolvable udp4 address.
func (*KValidator) IsUDP6AddrResolvable ¶
func (t *KValidator) IsUDP6AddrResolvable() bool
IsUDP6AddrResolvable is the validation function for validating if the field's value is a resolvable udp6 address.
func (*KValidator) IsUDPAddrResolvable ¶
func (t *KValidator) IsUDPAddrResolvable() bool
IsUDPAddrResolvable is the validation function for validating if the field's value is a resolvable udp address.
func (*KValidator) IsURI ¶
func (t *KValidator) IsURI() bool
IsURI is the validation function for validating if the current field's value is a valid URI.
func (*KValidator) IsURL ¶
func (t *KValidator) IsURL() bool
IsURL is the validation function for validating if the current field's value is a valid URL.
func (*KValidator) IsURLEncoded ¶
func (t *KValidator) IsURLEncoded() bool
func (*KValidator) IsUUID ¶
func (t *KValidator) IsUUID() bool
IsUUID is the validation function for validating if the field's value is a valid UUID of any version.
func (*KValidator) IsUUID3 ¶
func (t *KValidator) IsUUID3() bool
IsUUID3 is the validation function for validating if the field's value is a valid v3 UUID.
func (*KValidator) IsUUID3RFC4122 ¶
func (t *KValidator) IsUUID3RFC4122() bool
IsUUID3RFC4122 is the validation function for validating if the field's value is a valid RFC4122 v3 UUID.
func (*KValidator) IsUUID4 ¶
func (t *KValidator) IsUUID4() bool
IsUUID4 is the validation function for validating if the field's value is a valid v4 UUID.
func (*KValidator) IsUUID4RFC4122 ¶
func (t *KValidator) IsUUID4RFC4122() bool
IsUUID4RFC4122 is the validation function for validating if the field's value is a valid RFC4122 v4 UUID.
func (*KValidator) IsUUID5 ¶
func (t *KValidator) IsUUID5() bool
IsUUID5 is the validation function for validating if the field's value is a valid v5 UUID.
func (*KValidator) IsUUID5RFC4122 ¶
func (t *KValidator) IsUUID5RFC4122() bool
IsUUID5RFC4122 is the validation function for validating if the field's value is a valid RFC4122 v5 UUID.
func (*KValidator) IsUUIDRFC4122 ¶
func (t *KValidator) IsUUIDRFC4122() bool
IsUUIDRFC4122 is the validation function for validating if the field's value is a valid RFC4122 UUID of any version.
func (*KValidator) IsUnixAddrResolvable ¶
func (t *KValidator) IsUnixAddrResolvable() bool
IsUnixAddrResolvable is the validation function for validating if the field's value is a resolvable unix address.
func (*KValidator) Required ¶
func (t *KValidator) Required() bool
HasValue is the validation function for validating if the current field's value is not the default static value.