validator

package
v0.0.0-...-d99cf4a Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Instance

func Instance() *validator.Validate

func InvalidValidationError

func InvalidValidationError(err error) bool

Types

type Error

type Error struct {
	ErrorName string      `json:"error"`
	Param     string      `json:"param"`
	Message   string      `json:"message"`
	Value     interface{} `json:"value"`
}

func Val

func Val(validate *validator.Validate, fields ...Field) (errors []Error)

Val returns errors

type Field

type Field struct {
	Param          string
	Message        string
	Value          interface{}
	OtherValue     interface{}
	Tag            string
	OmitParamValue bool
}

Field stores error details

Jump to

Keyboard shortcuts

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