validator

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package validator provides custom validation extensions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomValidator

type CustomValidator struct {
	Validator *validator.Validate
}

CustomValidator wraps the go-playground validator.

func New

func New() *CustomValidator

New creates a new validator with common customizations.

func (*CustomValidator) RegisterValidation

func (cv *CustomValidator) RegisterValidation(tag string, fn validator.Func) error

RegisterValidation registers a custom validation function.

func (*CustomValidator) Validate

func (cv *CustomValidator) Validate(i any) error

Validate validates a struct.

Jump to

Keyboard shortcuts

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