validators

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckArray

func CheckArray(v reflect.Value, c *model.AstValue) error

func CheckBool added in v0.2.0

func CheckBool(v reflect.Value, c *model.AstValue) error

func CheckFloat

func CheckFloat(v reflect.Value, c *model.AstValue) error

func CheckInt

func CheckInt(v reflect.Value, c *model.AstValue) error

func CheckMap

func CheckMap(v reflect.Value, c *model.AstValue) error

func CheckString

func CheckString(v reflect.Value, c *model.AstValue) error

func CheckTime added in v0.1.9

func CheckTime(v reflect.Value, c *model.AstValue) error

func ValidateGroups added in v0.2.1

func ValidateGroups(groups map[string]*model.Group, groupSize map[string]int, groupErrors map[string][]error) error

func ValueContains

func ValueContains(reflectValue reflect.Value, contain string) (string, error)

ValueContains checks, if the [reflectValue] contains [contain].

func ValueFrom

func ValueFrom(reflectValue reflect.Value, from []string, shouldFind bool) (string, error)

ValueFrom checks, if the [reflectValue] consists of only ([shouldFind] == true)/of none ([shouldFind] == false) of the values from [from]. If a value is not found with [shouldFind] == true the missing value is given back. If a value is found with [shouldFind] == false the value found is given back.

Types

This section is empty.

Jump to

Keyboard shortcuts

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