validate

package
v0.0.0-...-a61272a Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PasswordTag = "password"
)

Variables

This section is empty.

Functions

func GetTranslator

func GetTranslator(locale string) ut.Translator

func RegisterPasswordTag

func RegisterPasswordTag(validate *validator.Validate)

func RegisterPasswordTranslations

func RegisterPasswordTranslations(validate *validator.Validate, uni *ut.UniversalTranslator)

func Struct

func Struct(v any) error

Validates a struct based on the `validate` tags

func ValidatePassword

func ValidatePassword(s string) bool

Types

type Error

type Error struct {
	validator.ValidationErrors
}

func (*Error) Translate

func (e *Error) Translate() map[string]any

Jump to

Keyboard shortcuts

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