validation

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package validation provides common validation utilities for configuration parameters across the goflow library.

This package offers reusable validation functions that help ensure consistent error messages and reduce boilerplate code in constructors and configuration parsers.

Package validation provides common validation utilities for the goflow library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateNonNegative

func ValidateNonNegative(module, field string, value float64) error

ValidateNonNegative validates that a numeric value is non-negative (>= 0). Returns a ValidationError if the value is negative.

func ValidateNotEmpty

func ValidateNotEmpty(module, field string, value string) error

ValidateNotEmpty validates that a string value is not empty. Returns a ValidationError if the string is empty.

func ValidateNotNil

func ValidateNotNil(module, field string, value interface{}) error

ValidateNotNil validates that an interface value is not nil. Returns a ValidationError if the value is nil.

func ValidatePositive

func ValidatePositive(module, field string, value int) error

ValidatePositive validates that an integer value is positive (> 0). Returns a ValidationError if the value is not positive.

func ValidatePositiveFloat

func ValidatePositiveFloat(module, field string, value float64) error

ValidatePositiveFloat validates that a float64 value is positive (> 0). Returns a ValidationError if the value is not positive.

Types

This section is empty.

Jump to

Keyboard shortcuts

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