is

package
v0.0.0-...-a4b6dd1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidFormat   = "INVALID_FORMAT"
	InvalidType     = "INVALID_TYPE"
	UnexpectedValue = "UNEXPECTED_VALUE"
	TooLong         = "TOO_LONG"
	TooShort        = "TOO_SHORT"
	MissingField    = "MISSING_FIELD"
	AlreadyUsed     = "ALREADY_USED"
)

Variables

View Source
var (
	DNSName          = newStringRule(govalidator.IsDNSName)
	Email            = newStringRule(govalidator.IsEmail)
	Host             = newStringRule(govalidator.IsHost)
	ID               = newStringRule(govalidator.IsUUIDv4)
	IPv4             = newStringRule(govalidator.IsIPv4)
	IPv6             = newStringRule(govalidator.IsIPv6)
	LowerCase        = newStringRule(govalidator.IsLowerCase)
	Port             = newStringRule(govalidator.IsPort)
	UpperCase        = newStringRule(govalidator.IsUpperCase)
	URL              = newStringRule(govalidator.IsURL)
	UTFDigit         = newStringRule(govalidator.IsUTFDigit)
	UTFLetter        = newStringRule(govalidator.IsUTFLetter)
	UTFLetterNumeric = newStringRule(govalidator.IsUTFLetterNumeric)
)

Functions

func ArrayInRange

func ArrayInRange(min int, max int) func(in interface{}) error

func MatchingString

func MatchingString(pattern string) func(string) error

func NumberPositif

func NumberPositif(number int) error

func OnOfString

func OnOfString(matches ...string) func(string) error

func StringInRange

func StringInRange(min int, max int) func(string) error

Types

type Presence

type Presence bool
const (
	Required Presence = true
	Optional Presence = false
)

Jump to

Keyboard shortcuts

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