validator

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddError

func AddError(errs *Errors, field, msg string)

AddError adds error pair (field, msg) to current Errors instance

Types

type Errors

type Errors struct {
	Data map[string][]string
}

Errors wraps validation errors It maps a field and the errors for the field as string

func Validate

func Validate(f interface{}) *Errors

Validate validates a struct

func (*Errors) String

func (e *Errors) String() string

Jump to

Keyboard shortcuts

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