Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Validator = sync.OnceValue(func() *validator.Validate { validator := validator.New() validator.RegisterValidation("floatin", floatInValidator) validator.RegisterValidation("choicelist", choiceListValidator) return validator })
Validator is a lazily-initialised, package-level singleton of *validator.Validate. It caches struct metadata for efficiency and registers the custom validation tags "floatin" (checks a float field against a whitelist of allowed values) and "choicelist" (checks that every comma-separated token is in an allowed set).
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.