validator

package
v0.1.1-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NameRegexp

type NameRegexp interface {
	GetName() string
	GetNameRegExp() *regexp.Regexp
	IsNameValid() bool
}

type ValidationError

type ValidationError struct {
	Field    string `json:"field"`
	Tag      string `json:"tag"`
	Type     string `json:"type"`
	Value    any    `json:"value"`
	Expected string `json:"expected,omitempty"`
}

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

func New

func New(log *logger.Log) *Validator

func (*Validator) Validate

func (v *Validator) Validate(s any) (errs []*ValidationError)

Jump to

Keyboard shortcuts

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