validation

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() ports.Validator

New returns the default validator implementation.

func NewBasicValidator

func NewBasicValidator() ports.Validator

NewBasicValidator retains the old constructor name but now returns the go-playground-backed validator.

func NewPlaygroundValidator

func NewPlaygroundValidator() ports.Validator

NewPlaygroundValidator constructs a validator backed by github.com/go-playground/validator/v10.

Types

type ValidationError

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

ValidationError represents a validation error with field-specific details.

func (ValidationError) Error

func (e ValidationError) Error() string

type ValidationErrors

type ValidationErrors struct {
	Errors []ValidationError `json:"errors"`
}

ValidationErrors represents multiple validation errors.

func (ValidationErrors) Error

func (e ValidationErrors) Error() string

Jump to

Keyboard shortcuts

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