optional

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AfterOpt

func AfterOpt[T any](f form.OptTimeField[T], t time.Time) form.Rule[T]

func AfterOptWithCode

func AfterOptWithCode[T any](f form.OptTimeField[T], t time.Time, code form.Code) form.Rule[T]

func BeforeOpt

func BeforeOpt[T any](f form.OptTimeField[T], t time.Time) form.Rule[T]

func BeforeOptWithCode

func BeforeOptWithCode[T any](f form.OptTimeField[T], t time.Time, code form.Code) form.Rule[T]

func BetweenFloat64Opt

func BetweenFloat64Opt[T any](f form.OptFloat64Field[T], min, max float64) form.Rule[T]

func BetweenFloat64OptWithCode

func BetweenFloat64OptWithCode[T any](f form.OptFloat64Field[T], min, max float64, code form.Code) form.Rule[T]

func BetweenIntOpt

func BetweenIntOpt[T any](f form.OptIntField[T], min, max int) form.Rule[T]

func BetweenIntOptWithCode

func BetweenIntOptWithCode[T any](f form.OptIntField[T], min, max int, code form.Code) form.Rule[T]

func BetweenTimeOpt

func BetweenTimeOpt[T any](f form.OptTimeField[T], min, max time.Time) form.Rule[T]

func BetweenTimeOptWithCode

func BetweenTimeOptWithCode[T any](f form.OptTimeField[T], min, max time.Time, code form.Code) form.Rule[T]

func MaxFloat64Opt

func MaxFloat64Opt[T any](f form.OptFloat64Field[T], n float64) form.Rule[T]

func MaxFloat64OptWithCode

func MaxFloat64OptWithCode[T any](f form.OptFloat64Field[T], n float64, code form.Code) form.Rule[T]

func MaxOpt

func MaxOpt[T any](f form.OptIntField[T], n int) form.Rule[T]

func MaxOptWithCode

func MaxOptWithCode[T any](f form.OptIntField[T], n int, code form.Code) form.Rule[T]

func MinFloat64Opt

func MinFloat64Opt[T any](f form.OptFloat64Field[T], n float64) form.Rule[T]

func MinFloat64OptWithCode

func MinFloat64OptWithCode[T any](f form.OptFloat64Field[T], n float64, code form.Code) form.Rule[T]

func MinOpt

func MinOpt[T any](f form.OptIntField[T], n int) form.Rule[T]

func MinOptWithCode

func MinOptWithCode[T any](f form.OptIntField[T], n int, code form.Code) form.Rule[T]

func OptionalFloat64

func OptionalFloat64[T any](f form.OptFloat64Field[T], rules ...form.Rule[T]) form.Rule[T]

OptionalFloat64 applies nested rules only when the float64 pointer field is non-nil.

func OptionalInt

func OptionalInt[T any](f form.OptIntField[T], rules ...form.Rule[T]) form.Rule[T]

OptionalInt applies nested rules only when the int pointer field is non-nil.

func OptionalPtr

func OptionalPtr[T any, V any](f form.Field[T, *V], rules ...form.Rule[T]) form.Rule[T]

func OptionalSlice

func OptionalSlice[T any, V any](f form.Field[T, []V], rules ...form.Rule[T]) form.Rule[T]

func OptionalString

func OptionalString[T any](f form.StringField[T], rules ...form.Rule[T]) form.Rule[T]

func OptionalTime

func OptionalTime[T any](f form.OptTimeField[T], rules ...form.Rule[T]) form.Rule[T]

OptionalTime applies nested rules only when the time pointer field is non-nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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