validator

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: MIT Imports: 21 Imported by: 0

README

golang-validator

#WIP

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Array

func Array() rule.Interface

func Boolean

func Boolean() rule.Interface

func Date

func Date(format string) rule.Interface

func Each

func Each(rules ...rule.Interface) rule.Interface

func Empty added in v0.2.0

func Empty() rule.Interface

func Float

func Float() rule.Interface

func HttpUrl added in v0.4.0

func HttpUrl() rule.Interface

func In

func In[V int64 | int32 | int16 | int8 | uint64 | uint32 | uint16 | uint8 | string](v []V) rule.Interface

func Int16

func Int16() rule.Interface

func Int32

func Int32() rule.Interface

func Int64

func Int64() rule.Interface

func Int8

func Int8() rule.Interface

func IpV4 added in v0.4.0

func IpV4() rule.Interface

func Max added in v0.3.1

func Max(v int64) rule.Interface

func Min added in v0.3.1

func Min(v int64) rule.Interface

func NotEmpty added in v0.2.0

func NotEmpty() rule.Interface

func Nullable added in v0.5.0

func Nullable(rules ...rule.Interface) rule.Interface

func Object

func Object() rule.Interface

func Required

func Required() rule.Interface

func String

func String() rule.Interface

func UInt16

func UInt16() rule.Interface

func UInt32

func UInt32() rule.Interface

func UInt64

func UInt64() rule.Interface

func UInt8

func UInt8() rule.Interface

Types

type Errors added in v0.3.0

type Errors map[string][]error

func Map

func Map(values map[string]any, rules Rules) Errors

func Validate

func Validate(body []byte, rules Rules) Errors

type Rules

type Rules map[string][]rule.Interface

Jump to

Keyboard shortcuts

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