validators

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(s interface{}) []string

Validate runs struct-level validation on the provided struct `s`. It applies custom validators, such as the UUID validator, and returns a slice of error messages if validation fails. Each error message follows the format: "field::tag::param" in lowercase.

func WithUUIDValidator

func WithUUIDValidator() validator.Option

WithUUIDValidator adds a custom UUID validator to the validator instance. This function registers the custom `uuid` validation with the validator.

Types

This section is empty.

Jump to

Keyboard shortcuts

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