validation

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlphaNumeric

func IsAlphaNumeric(v string) bool

func IsAlphaNumericWithDashAndSpace

func IsAlphaNumericWithDashAndSpace(v string) bool

func IsAlphaNumericWithSpace

func IsAlphaNumericWithSpace(v string) bool

func IsAlphabet

func IsAlphabet(v string) bool

func IsStandardDateFormat

func IsStandardDateFormat(v string) bool

Types

type DateOnly

type DateOnly string

DateOnly expected format yyyy-mm-dd

func ToDateOnly

func ToDateOnly(t *time.Time) DateOnly

func (DateOnly) String

func (d DateOnly) String() string

func (DateOnly) ToTime

func (d DateOnly) ToTime() *time.Time

type Manager

type Manager interface {
	Validate(i interface{}) error
	ValidateStruct(i interface{}) error
	RegisterRegexValidator(tag string, r *regexp.Regexp) Manager
	MustInit() Manager
	Engine() any
}

func NewValidator

func NewValidator() Manager

Jump to

Keyboard shortcuts

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