v8

package
v0.0.0-...-bbc86cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(_ context.Context, field interface{}, param interface{}) bool

Contains is the validation function for validating that the field's value contains the text specified within the param.

func ContainsAny

func ContainsAny(_ context.Context, field interface{}, param interface{}) bool

ContainsAny is the validation function for validating that the field's value contains any of the characters specified within the param.

func ContainsRune

func ContainsRune(_ context.Context, field interface{}, param interface{}) bool

ContainsRune is the validation function for validating that the field's value contains the rune specified within the param.

func Excludes

func Excludes(_ context.Context, field interface{}, param interface{}) bool

Excludes is the validation function for validating that the field's value does not contain the text specified within the param.

func ExcludesAll

func ExcludesAll(_ context.Context, field interface{}, param interface{}) 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 ExcludesRune

func ExcludesRune(_ context.Context, field interface{}, param interface{}) bool

ExcludesRune is the validation function for validating that the field's value does not contain the rune specified within the param.

func HasLengthOf

func HasLengthOf(_ context.Context, field interface{}, param interface{}) bool

HasLengthOf is the validation function for validating if the current field's value is equal to the param's value.

func HasMaxOf

func HasMaxOf(_ context.Context, field interface{}, param interface{}) 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 HasMinOf

func HasMinOf(_ context.Context, field interface{}, param interface{}) 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 HasMultiByteCharacter

func HasMultiByteCharacter(_ context.Context, field interface{}, _ interface{}) bool

HasMultiByteCharacter is the validation function for validating if the field's value has a multi byte character.

func IsASCII

func IsASCII(_ context.Context, field interface{}, _ interface{}) bool

IsASCII is the validation function for validating if the field's value is a valid ASCII character.

func IsAlpha

func IsAlpha(_ context.Context, field interface{}, param interface{}) bool

IsAlpha is the validation function for validating if the current field's value is a valid alpha value.

func IsAlphanum

func IsAlphanum(_ context.Context, field interface{}, _ interface{}) bool

IsAlphanum is the validation function for validating if the current field's value is a valid alphanumeric value.

func IsBase64

func IsBase64(_ context.Context, field interface{}, _ interface{}) bool

IsBase64 is the validation function for validating if the current field's value is a valid base 64.

func IsCIDR

func IsCIDR(_ context.Context, field interface{}, _ interface{}) bool

IsCIDR is the validation function for validating if the field's value is a valid v4 or v6 CIDR address.

func IsCIDRv4

func IsCIDRv4(_ context.Context, field interface{}, _ interface{}) bool

IsCIDRv4 is the validation function for validating if the field's value is a valid v4 CIDR address.

func IsCIDRv6

func IsCIDRv6(_ context.Context, field interface{}, _ interface{}) bool

IsCIDRv6 is the validation function for validating if the field's value is a valid v6 CIDR address.

func IsChinese

func IsChinese(_ context.Context, field interface{}, param interface{}) bool

func IsDataURI

func IsDataURI(_ context.Context, field interface{}, _ interface{}) bool

IsDataURI is the validation function for validating if the field's value is a valid data URI.

func IsEmail

func IsEmail(_ context.Context, field interface{}, _ interface{}) bool

IsEmail is the validation function for validating if the current field's value is a valid email address.

func IsEq

func IsEq(_ context.Context, field interface{}, param interface{}) bool

IsEq is the validation function for validating if the current field's value is equal to the param's value.

func IsGt

func IsGt(_ context.Context, field interface{}, param interface{}) bool

IsGt is the validation function for validating if the current field's value is greater than the param's value.

func IsGte

func IsGte(_ context.Context, field interface{}, param interface{}) 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 IsHEXColor

func IsHEXColor(_ context.Context, field interface{}, _ interface{}) bool

IsHEXColor is the validation function for validating if the current field's value is a valid HEX color.

func IsHSL

func IsHSL(_ context.Context, field interface{}, _ interface{}) bool

IsHSL is the validation function for validating if the current field's value is a valid HSL color.

func IsHSLA

func IsHSLA(_ context.Context, field interface{}, _ interface{}) bool

IsHSLA is the validation function for validating if the current field's value is a valid HSLA color.

func IsHexadecimal

func IsHexadecimal(_ context.Context, field interface{}, _ interface{}) bool

IsNumber is the validation function for validating if the current field's value is a valid number.

func IsIP

func IsIP(_ context.Context, field interface{}, _ interface{}) bool

IsIP is the validation function for validating if the field's value is a valid v4 or v6 IP address.

func IsIP4AddrResolvable

func IsIP4AddrResolvable(_ context.Context, field interface{}, _ interface{}) bool

IsIP4AddrResolvable is the validation function for validating if the field's value is a resolvable ip4 address.

func IsIP6AddrResolvable

func IsIP6AddrResolvable(_ context.Context, field interface{}, _ interface{}) bool

IsIP6AddrResolvable is the validation function for validating if the field's value is a resolvable ip6 address.

func IsIPAddrResolvable

func IsIPAddrResolvable(_ context.Context, field interface{}, _ interface{}) bool

IsIPAddrResolvable is the validation function for validating if the field's value is a resolvable ip address.

func IsIPv4

func IsIPv4(_ context.Context, field interface{}, _ interface{}) bool

IsIPv4 is the validation function for validating if a value is a valid v4 IP address.

func IsIPv6

func IsIPv6(_ context.Context, field interface{}, _ interface{}) bool

IsIPv6 is the validation function for validating if the field's value is a valid v6 IP address.

func IsISBN

func IsISBN(ctx context.Context, field interface{}, param interface{}) bool

IsISBN is the validation function for validating if the field's value is a valid v10 or v13 ISBN.

func IsISBN10

func IsISBN10(_ context.Context, field interface{}, _ interface{}) bool

IsISBN10 is the validation function for validating if the field's value is a valid v10 ISBN.

func IsISBN13

func IsISBN13(_ context.Context, field interface{}, _ interface{}) bool

IsISBN13 is the validation function for validating if the field's value is a valid v13 ISBN.

func IsLatitude

func IsLatitude(_ context.Context, field interface{}, _ interface{}) bool

IsLatitude is the validation function for validating if the field's value is a valid latitude coordinate.

func IsLongitude

func IsLongitude(_ context.Context, field interface{}, _ interface{}) bool

IsLongitude is the validation function for validating if the field's value is a valid longitude coordinate.

func IsLt

func IsLt(_ context.Context, field interface{}, param interface{}) bool

IsLt is the validation function for validating if the current field's value is less than the param's value.

func IsLte

func IsLte(_ context.Context, field interface{}, param interface{}) 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 IsMAC

func IsMAC(_ context.Context, field interface{}, _ interface{}) bool

IsMAC is the validation function for validating if the field's value is a valid MAC address.

func IsNe

func IsNe(ctx context.Context, field interface{}, param interface{}) bool

IsGt is the validation function for validating if the current field's value is greater than the param's value.

func IsNickName

func IsNickName(_ context.Context, field interface{}, param interface{}) bool

func IsNumber

func IsNumber(_ context.Context, field interface{}, param interface{}) bool

IsNumber is the validation function for validating if the current field's value is a valid number.

func IsNumeric

func IsNumeric(_ context.Context, field interface{}, param interface{}) bool

IsNumeric is the validation function for validating if the current field's value is a valid numeric value.

func IsPrintableASCII

func IsPrintableASCII(_ context.Context, field interface{}, _ interface{}) bool

IsPrintableASCII is the validation function for validating if the field's value is a valid printable ASCII character.

func IsRGB

func IsRGB(_ context.Context, field interface{}, _ interface{}) bool

IsRGB is the validation function for validating if the current field's value is a valid RGB color.

func IsRGBA

func IsRGBA(_ context.Context, field interface{}, _ interface{}) bool

IsRGBA is the validation function for validating if the current field's value is a valid RGBA color.

func IsSSN

func IsSSN(_ context.Context, field interface{}, _ interface{}) bool

IsSSN is the validation function for validating if the field's value is a valid SSN.

func IsTCP4AddrResolvable

func IsTCP4AddrResolvable(ctx context.Context, field interface{}, _ interface{}) bool

IsTCP4AddrResolvable is the validation function for validating if the field's value is a resolvable tcp4 address.

func IsTCP6AddrResolvable

func IsTCP6AddrResolvable(_ context.Context, field interface{}, _ interface{}) bool

IsTCP6AddrResolvable is the validation function for validating if the field's value is a resolvable tcp6 address.

func IsTCPAddrResolvable

func IsTCPAddrResolvable(_ context.Context, field interface{}, _ interface{}) bool

IsTCPAddrResolvable is the validation function for validating if the field's value is a resolvable tcp address.

func IsUDP4AddrResolvable

func IsUDP4AddrResolvable(_ context.Context, field interface{}, _ interface{}) bool

IsUDP4AddrResolvable is the validation function for validating if the field's value is a resolvable udp4 address.

func IsUDP6AddrResolvable

func IsUDP6AddrResolvable(_ context.Context, field interface{}, _ interface{}) bool

IsUDP6AddrResolvable is the validation function for validating if the field's value is a resolvable udp6 address.

func IsUDPAddrResolvable

func IsUDPAddrResolvable(_ context.Context, field interface{}, _ interface{}) bool

IsUDPAddrResolvable is the validation function for validating if the field's value is a resolvable udp address.

func IsURI

func IsURI(_ context.Context, field interface{}, _ interface{}) bool

IsURI is the validation function for validating if the current field's value is a valid URI.

func IsURL

func IsURL(_ context.Context, field interface{}, _ interface{}) bool

IsURL is the validation function for validating if the current field's value is a valid URL.

func IsUUID

func IsUUID(_ context.Context, field interface{}, _ interface{}) bool

IsUUID is the validation function for validating if the field's value is a valid UUID of any version.

func IsUUID3

func IsUUID3(_ context.Context, field interface{}, _ interface{}) bool

IsUUID3 is the validation function for validating if the field's value is a valid v3 UUID.

func IsUUID4

func IsUUID4(_ context.Context, field interface{}, _ interface{}) bool

IsUUID4 is the validation function for validating if the field's value is a valid v4 UUID.

func IsUUID5

func IsUUID5(_ context.Context, field interface{}, _ interface{}) bool

IsUUID5 is the validation function for validating if the field's value is a valid v5 UUID.

func IsUnixAddrResolvable

func IsUnixAddrResolvable(_ context.Context, field interface{}, _ interface{}) bool

IsUnixAddrResolvable is the validation function for validating if the field's value is a resolvable unix address.

func RegisterValidation

func RegisterValidation(key string, fn validator.Func) error

Types

type Func

type Func = validator.Func

type Validate

type Validate = validator.Validate

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL