validator

package
v0.0.0-...-e5d423c Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindAndValidate

func BindAndValidate(c *gin.Context, req interface{}) bool

BindAndValidate binds JSON and validates in one step Returns true if successful, false if validation failed (and sets error response)

func ValidateRequest

func ValidateRequest(s interface{}) map[string]string

ValidateRequest validates a request struct and returns formatted errors Returns nil if validation passes, or a map of field errors

func ValidateStruct

func ValidateStruct(s interface{}) error

ValidateStruct validates a struct and returns user-friendly error messages

Types

This section is empty.

Jump to

Keyboard shortcuts

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