validators

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckArray

func CheckArray(a reflect.Value, c []string, or bool) error

func CheckFloat

func CheckFloat(f float64, c []string, or bool) error

func CheckInt

func CheckInt(i int, c []string, or bool) error

func CheckMap

func CheckMap(a reflect.Value, c []string, or bool) error

func CheckString

func CheckString(s string, c []string, or bool) error

func ValidateGroup

func ValidateGroup(groups map[string]string, 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