validate

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsNull

func ContainsNull(s string) bool

func ContainsSpaces

func ContainsSpaces(s string) bool

func IsBlank

func IsBlank(s string) bool

func IsEmpty

func IsEmpty[T any](s []T) bool

func IsGreaterOrEqual added in v1.3.2

func IsGreaterOrEqual[T math.Number](value, other T, msg string, args ...any) error

IsGreaterOrEqual checks if the first provided numeric value (of type T) is greater or equal to the second. It returns an error if the first value is less than the second, using the provided message and arguments. T is a generic type constrained to math.Number, allowing the function to work with various numeric types.

func IsGreaterOrEqualToZero added in v1.3.2

func IsGreaterOrEqualToZero[T math.Number](value T, msg string, args ...any) error

IsGreaterOrEqualToZero checks if the provided numeric value (of type T) is greater or equal to zero. It returns an error if the value is less than zero, using the provided message and arguments. T is a generic type constrained to math.Number, allowing the function to work with various numeric types.

func IsGreaterThan added in v1.3.2

func IsGreaterThan[T math.Number](value, other T, msg string, args ...any) error

IsGreaterThan checks if the first provided numeric value (of type T) is greater than the second. It returns an error if the first value is not greater than the second, using the provided message and arguments. T is a generic type constrained to math.Number, allowing the function to work with various numeric types.

func IsGreaterThanZero added in v1.2.1

func IsGreaterThanZero[T math.Number](value T, msg string, args ...any) error

IsGreaterThanZero checks if the provided numeric value (of type T) is greater than zero. It returns an error if the value is not greater than zero, using the provided message and arguments. T is a generic type constrained to math.Number, allowing the function to work with various numeric types.

func IsNotBlank

func IsNotBlank(s string) bool

func IsNotEmpty

func IsNotEmpty[T any](s []T) bool

func IsNotNil added in v1.2.1

func IsNotNil(value any, msg string, args ...any) error

IsNotNil checks if the provided value is not nil. Returns an error if the value is nil, using the provided message and arguments.

Types

This section is empty.

Jump to

Keyboard shortcuts

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