validator

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Email = Format(regexp.MustCompile(`^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`))

Functions

This section is empty.

Types

type Validator

type Validator func(k string) ValidatorFunc

func Format

func Format(r *regexp.Regexp) Validator

func OneOf

func OneOf(values []fmt.Stringer) Validator

type ValidatorFunc

type ValidatorFunc func(v ...any) errors.ValidationError

func Required

func Required(k string) ValidatorFunc

Jump to

Keyboard shortcuts

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