valid

package
v0.0.0-...-8bf5510 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPath

func IsPath(str string) bool

IsPath checks if string is a valid path

Types

type Error

type Error = valid.Error

Error encapsulates a name, an error and whether there's a custom error message or not.

type Errors

type Errors struct {
	valid.Errors
}

Errors is an array of multiple errors and conforms to the error interface.

func (*Errors) AppendError

func (es *Errors) AppendError(err error)

AppendError appends an error if declared

func (*Errors) AppendFieldError

func (es *Errors) AppendFieldError(name, validator string, err error, path ...string)

AppendFieldError appends a validator error

func (*Errors) AsError

func (es *Errors) AsError() error

AsError returns an array of errors, or nil if none has been appended

Jump to

Keyboard shortcuts

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