validation

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const CurrentField = ""

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldErrors

type FieldErrors field.ErrorList

func ErrDisallowedFields

func ErrDisallowedFields(name string, detail string) FieldErrors

func ErrDuplicateValue

func ErrDuplicateValue(value interface{}, names ...string) FieldErrors

func ErrInvalidArrayValue

func ErrInvalidArrayValue(value interface{}, name string, index int) FieldErrors

func ErrInvalidValue

func ErrInvalidValue(value interface{}, name string) FieldErrors

func ErrMissingField

func ErrMissingField(name string) FieldErrors

func ErrMissingOneOf

func ErrMissingOneOf(names ...string) FieldErrors

func ErrMultipleOneOf

func ErrMultipleOneOf(names ...string) FieldErrors

func (FieldErrors) Also

func (e FieldErrors) Also(errs ...FieldErrors) FieldErrors

func (FieldErrors) ErrorList

func (e FieldErrors) ErrorList() field.ErrorList

func (FieldErrors) ToAggregate

func (e FieldErrors) ToAggregate() error

func (FieldErrors) ViaField

func (e FieldErrors) ViaField(key string) FieldErrors

func (FieldErrors) ViaFieldIndex

func (e FieldErrors) ViaFieldIndex(key string, index int) FieldErrors

func (FieldErrors) ViaIndex

func (e FieldErrors) ViaIndex(index int) FieldErrors

type FieldValidator

type FieldValidator interface {
	Validate() FieldErrors
}

type Validatable

type Validatable = interface {
	Validate(context.Context) FieldErrors
}

Jump to

Keyboard shortcuts

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