validation

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(checks ...Check) error

Types

type Check

type Check func() error

func CheckEmailAddress

func CheckEmailAddress(addr string) Check

func CheckErr

func CheckErr(err error) Check

Wrapper to check errors.

func CheckMultiple

func CheckMultiple(checks ...Check) Check

func CheckNetworkPort

func CheckNetworkPort(in int) Check

func CheckNotNil

func CheckNotNil(in any) Check

func CheckStringIs

func CheckStringIs(in string, match string) Check

func CheckStringIsEither

func CheckStringIsEither(in string, options ...string) Check

func CheckStringNotEmpty

func CheckStringNotEmpty(in string) Check

func CheckUTF8StringMaxLength

func CheckUTF8StringMaxLength(in string, max int) Check

Exclusive

func CheckUTF8StringMinLength

func CheckUTF8StringMinLength(in string, min int) Check

Inclusive

func CheckWhen

func CheckWhen(ok bool, v Check) Check

Jump to

Keyboard shortcuts

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