rules

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2019 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boolean

type Boolean struct{}

func (Boolean) FmtError

func (Boolean) FmtError(val string) string

func (Boolean) Validate

func (b Boolean) Validate(input string) bool

type Choice

type Choice struct {
	Choices []string
}

func (Choice) FmtError

func (c Choice) FmtError(val string) string

func (Choice) Validate

func (c Choice) Validate(input string) bool

type Email

type Email struct{}

func (Email) FmtError

func (Email) FmtError(val string) string

func (Email) Validate

func (e Email) Validate(input string) bool

type EndsWith

type EndsWith struct {
	Suffix string
}

func (EndsWith) FmtError

func (s EndsWith) FmtError(val string) string

func (EndsWith) Validate

func (s EndsWith) Validate(input string) bool

type Float

type Float struct{}

func (Float) FmtError

func (Float) FmtError(val string) string

func (Float) Validate

func (i Float) Validate(value string) bool

type Integer

type Integer struct{}

func (Integer) FmtError

func (Integer) FmtError(val string) string

func (Integer) Validate

func (i Integer) Validate(value string) bool

type Regex

type Regex struct {
	Pattern *regexp.Regexp
}

func (Regex) FmtError

func (r Regex) FmtError(val string) string

func (Regex) Validate

func (r Regex) Validate(input string) bool

type Required

type Required struct{}

func (Required) FmtError

func (Required) FmtError(val string) string

func (Required) Validate

func (r Required) Validate(val string) bool

type SizeBetween

type SizeBetween struct {
	Lower uint
	Upper uint
}

func (SizeBetween) FmtError

func (r SizeBetween) FmtError(val string) string

func (SizeBetween) Validate

func (r SizeBetween) Validate(val string) bool

type StartsWith

type StartsWith struct {
	Prefix string
}

func (StartsWith) FmtError

func (s StartsWith) FmtError(val string) string

func (StartsWith) Validate

func (s StartsWith) Validate(input string) bool

type URL

type URL struct{}

func (URL) FmtError

func (URL) FmtError(val string) string

func (URL) Validate

func (u URL) Validate(str string) bool

type UUIDv4 added in v0.0.4

type UUIDv4 struct{}

func (UUIDv4) FmtError added in v0.0.4

func (s UUIDv4) FmtError(val string) string

func (UUIDv4) Validate added in v0.0.4

func (s UUIDv4) Validate(v string) bool

Jump to

Keyboard shortcuts

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