validation

package
v0.0.0-...-5bd5591 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StringValidator

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

func (*StringValidator) Equals

func (v *StringValidator) Equals(other string, message string) *StringValidator

func (*StringValidator) MaxLength

func (v *StringValidator) MaxLength(length int, message string) *StringValidator

func (*StringValidator) MinLength

func (v *StringValidator) MinLength(length int, message string) *StringValidator

func (*StringValidator) NotEmpty

func (v *StringValidator) NotEmpty(message string) *StringValidator

type ValidationError

type ValidationError struct {
	Messages []string
}

func (*ValidationError) AddMessage

func (e *ValidationError) AddMessage(message string)

func (*ValidationError) Error

func (e *ValidationError) Error() string

type Validator

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

func New

func New() *Validator

func (*Validator) Result

func (v *Validator) Result() error

func (*Validator) String

func (v *Validator) String(value string) *StringValidator

Jump to

Keyboard shortcuts

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