validator

package
v0.0.0-...-6375eca Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProviders

func RegisterProviders(container *dig.Container) error

Types

type ErrorsMap

type ErrorsMap map[string][]string

type Translations

type Translations map[string]string

type ValidationErrors

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

func (*ValidationErrors) Add

func (e *ValidationErrors) Add(field, message string)

func (*ValidationErrors) Error

func (e *ValidationErrors) Error() string

func (*ValidationErrors) Errors

func (e *ValidationErrors) Errors() ErrorsMap

type Validator

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

func NewValidator

func NewValidator() *Validator

func (*Validator) RegisterDefaultTranslations

func (v *Validator) RegisterDefaultTranslations()

func (*Validator) RegisterTranslation

func (v *Validator) RegisterTranslation(tag, message string)

func (*Validator) Validate

func (v *Validator) Validate(i interface{}) error

Jump to

Keyboard shortcuts

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