rules

package
v0.0.0-...-264534e Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package rules implements validation rules for fields in structs.

Package rules implements validation rules for fields in structs.

Package rules implements validation rules for fields in structs.

Package rules implements validation rules for fields in structs.

Package rules implements validation rules for fields in structs.

Package rules implements validation rules for fields in structs.

Package rules implements validation rules for fields in structs.

Package rules implements validation rules for fields in structs.

Package rules implements validation rules for fields in structs.

Package rules implements validation rules for fields in structs.

Package rules implements validation rules for fields in structs.

Package rules implements validation rules for fields in structs.

Package rules implements validation rules for fields in structs.

Package rules implements validation rules for fields in structs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAlpha

func ValidateAlpha(input registry.ValidatorInput) validator.Validator

ValidateAlpha creates a new alphaValidator for string types.

func ValidateCEL

func ValidateCEL(input registry.ValidatorInput) validator.Validator

ValidateCEL creates a new celValidator for fields with CEL marker. This validator supports all field types since CEL can handle various data types.

func ValidateEmail

func ValidateEmail(input registry.ValidatorInput) validator.Validator

ValidateEmail creates a new emailValidator for string types.

func ValidateEnum

func ValidateEnum(input registry.ValidatorInput) validator.Validator

ValidateEnum creates a new enumValidator for string, numeric, and custom types.

func ValidateGT

func ValidateGT(input registry.ValidatorInput) validator.Validator

ValidateGT creates a new gtValidator if the field type is numeric and the max marker is present.

func ValidateGTE

func ValidateGTE(input registry.ValidatorInput) validator.Validator

ValidateGTE creates a new gteValidator if the field type is numeric and the gte marker is present.

func ValidateIpv4

func ValidateIpv4(input registry.ValidatorInput) validator.Validator

ValidateIpv4 creates a new ipv4 validator for the given field.

func ValidateIpv6

func ValidateIpv6(input registry.ValidatorInput) validator.Validator

ValidateIpv6 creates a new ipv6 validator for the given field.

func ValidateLT

func ValidateLT(input registry.ValidatorInput) validator.Validator

ValidateLT creates a new ltValidator if the field type is numeric and the min marker is present.

func ValidateLTE

func ValidateLTE(input registry.ValidatorInput) validator.Validator

ValidateLTE creates a new lteValidator if the field type is numeric and the lte marker is present.

func ValidateLength

func ValidateLength(input registry.ValidatorInput) validator.Validator

ValidateLength creates a new lengthValidator if the field type is string and the length marker is present.

func ValidateMaxItems

func ValidateMaxItems(input registry.ValidatorInput) validator.Validator

ValidateMaxItems creates a new maxItemsValidator if the field type supports len() and the maxitems marker is present.

func ValidateMaxLength

func ValidateMaxLength(input registry.ValidatorInput) validator.Validator

ValidateMaxLength creates a new maxLengthValidator if the field type is string and the maxlength marker is present.

func ValidateMinItems

func ValidateMinItems(input registry.ValidatorInput) validator.Validator

ValidateMinItems creates a new minItemsValidator if the field type supports len() and the minitems marker is present.

func ValidateMinLength

func ValidateMinLength(input registry.ValidatorInput) validator.Validator

ValidateMinLength creates a new minLengthValidator if the field type is string and the minlength marker is present.

func ValidateNumeric

func ValidateNumeric(input registry.ValidatorInput) validator.Validator

ValidateNumeric creates a new numericValidator if the 'numeric' marker is present and field is string.

func ValidateRequired

func ValidateRequired(input registry.ValidatorInput) validator.Validator

ValidateRequired creates a new required validator for the given field.

func ValidateURL

func ValidateURL(input registry.ValidatorInput) validator.Validator

ValidateURL creates a new urlValidator for string types.

func ValidateUUID

func ValidateUUID(input registry.ValidatorInput) validator.Validator

ValidateUUID creates a new uuidValidator for string types.

Types

This section is empty.

Jump to

Keyboard shortcuts

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