validation

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDNS1123Name

func IsDNS1123Name(value string) error

IsDNS1123Name tests for a string that conforms to the definition of a name in DNS (RFC 1123).

func IsDisplayName

func IsDisplayName(value string) error

IsDisplayName test whether the given value meets the specification of the display name.

func IsEmail

func IsEmail(value string) error

IsEmail test whether the given value meets the specification of the email.

func IsPhoneNumber

func IsPhoneNumber(value string) error

IsPhoneNumber test whether the given value meets the specification of the phone number.

func IsSubNetOverlapped added in v1.2.5

func IsSubNetOverlapped(net1, net2 *net.IPNet) error

IsSubNetOverlapped test if two subnets are overlapped

func IsURL

func IsURL(value string) error

IsURL test whether the given value is a valid URL address.

func IsValiadURL added in v1.2.5

func IsValiadURL(url string, timeout time.Duration) error

IsValiadURL tests that https://host:port is reachble in timeout.

func ValidateEnum added in v1.2.5

func ValidateEnum(value interface{}, fldPath *field.Path, values interface{}) field.ErrorList

ValidateEnum validates a given enum. nil or nil pointer is valid. zero value is invalid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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