validation

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidEmail

func IsValidEmail(email string) bool

func ValidatePassword

func ValidatePassword(fl validator.FieldLevel) bool

Types

type ErrorHandler added in v0.0.30

type ErrorHandler struct {
	CustomGetMessage func(err validator.FieldError) string
	// contains filtered or unexported fields
}

func NewErrorHandler added in v0.0.30

func NewErrorHandler(ctx context.Context) ErrorHandler

func NewErrorHandlerWithCustomMessages added in v0.0.30

func NewErrorHandlerWithCustomMessages(ctx context.Context, msgGetter func(err validator.FieldError) string) ErrorHandler

func (ErrorHandler) AddFieldErrorToResponse added in v0.0.30

func (e ErrorHandler) AddFieldErrorToResponse(field string, message string) error

func (ErrorHandler) AddValidationsErrors added in v0.0.30

func (e ErrorHandler) AddValidationsErrors(err error) error

Jump to

Keyboard shortcuts

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