validators

package
v1.3.1-0...-9810bd5 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FQDNValidator

func FQDNValidator() func(string) error

func IPValidator

func IPValidator() func(string) error

func IPv4Validator

func IPv4Validator() func(string) error

func IPv6Validator

func IPv6Validator() func(string) error

func Max

func Max(maxVal int) func(string) error

func MaxLength

func MaxLength(maxLen int) func(string) error

func Min

func Min(minVal int) func(string) error

func MinLength

func MinLength(minLen int) func(string) error

func MultiRequired

func MultiRequired(name string) func([]string) error

func RegexValidator

func RegexValidator(regex string) func(string) error

func Required

func Required(name string, trim bool) func(string) error

Types

type Validator

type Validator[T string | []string] func(T) error

func Group

func Group[T string | []string](validators ...Validator[T]) Validator[T]

Jump to

Keyboard shortcuts

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