validator

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidateTypeRequired = "required"
	ValidateTypeRegex    = "regex"
	ValidateTypeObjectID = "objectId"
)

Validate types

Variables

This section is empty.

Functions

func Validate

func Validate(v interface{}) error

Validate validator

func ValidateFieldValue

func ValidateFieldValue(f reflect.Value, validateInfo string, label string) error

ValidateFieldValue validator

Types

type ValidateElement added in v0.2.6

type ValidateElement struct {
	Type    string
	Content string
}

ValidateElement validate information

func AnalyzeValidateElements added in v0.2.6

func AnalyzeValidateElements(validateInfo string) []ValidateElement

AnalyzeValidateElements validator

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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