validate

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateBatchSize

func ValidateBatchSize(count, max int, name string) error

ValidateBatchSize checks that count does not exceed max.

func ValidateControlChars

func ValidateControlChars(s string) error

ValidateControlChars rejects strings containing ASCII control characters other than TAB (0x09), LF (0x0A), and CR (0x0D).

func ValidateDate

func ValidateDate(s string) error

ValidateDate checks that s is a valid YYYY-MM-DD date.

func ValidateDateRange

func ValidateDateRange(start, end string) error

ValidateDateRange checks that start and end are valid dates and start <= end.

func ValidateEnum

func ValidateEnum(value string, allowed []string) error

ValidateEnum checks that value is one of the allowed values.

func ValidateFilePath

func ValidateFilePath(path string) error

ValidateFilePath resolves symlinks and rejects paths containing traversal components.

func ValidateJournalType

func ValidateJournalType(s string) error

ValidateJournalType checks that s is a valid journal type.

func ValidateTransitionType

func ValidateTransitionType(s string) error

ValidateTransitionType checks that s is a valid transition type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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