validator

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(data any, info ...*Validation) (err error)

Types

type OptionName

type OptionName string
const (
	Required OptionName = "Required"
	Email    OptionName = "Email"
)

type OptionValue

type OptionValue struct {
	Value   bool
	Message string
}

type Options

type Options struct {
	Required OptionValue
	Email    OptionValue
}

type Validation

type Validation struct {
	Name    string
	Options Options
}

Jump to

Keyboard shortcuts

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