validator

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCustomValidators

func RegisterCustomValidators(v *validator.Validate)

Register custom validators

Types

type ValidationError

type ValidationError struct {
	Field   string `json:"field"`
	Message string `json:"message"`
	Value   string `json:"value,omitempty"`
}

ValidationError represents a user-friendly validation error

type Validator

type Validator []ValidationError

ValidationErrors is a collection of validation errors

func NewValidator

func NewValidator(s interface{}) Validator

func (Validator) ErrorMessages

func (ve Validator) ErrorMessages() string

func (Validator) Errors

func (ve Validator) Errors() []ValidationError

func (Validator) IsValid

func (ve Validator) IsValid() bool

Jump to

Keyboard shortcuts

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