validator

package
v0.0.0-...-a5e7dda Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Server

func Server(opts ...Option) middleware.Middleware

Server is a validator middleware.

Types

type OnValidationErrCallback

type OnValidationErrCallback func(ctx context.Context, err error)

type Option

type Option func(*options)

func WithFailFast

func WithFailFast() Option

WithFailFast tells validator to immediately stop doing further validation after first validation error. This option is ignored if message is only supporting validator.validatorLegacy interface.

func WithOnValidationErrCallback

func WithOnValidationErrCallback(onValidationErrCallback OnValidationErrCallback) Option

WithOnValidationErrCallback registers function that will be invoked on validation error(s).

Jump to

Keyboard shortcuts

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