Help us shape the future of Go! Take the 2026 Go Developer Survey

validator

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnumPtr

func EnumPtr[T StringEnum](field string, old *string, current *T) error

EnumPtr validates enum pointer fields using generics

func IntPtr

func IntPtr(field string, old *int, current *int) error

IntPtr validates int pointer fields

func String

func String(field string, old *string, current string) error

String validates string fields

func StringPtr

func StringPtr(field string, old *string, current *string) error

StringPtr validates string pointer fields

func UUID

func UUID(field string, old *uuid.UUID, current uuid.NullUUID) error

UUID validates UUID fields

Types

type ErrEditPrerequisiteFailed

type ErrEditPrerequisiteFailed struct {
	// contains filtered or unexported fields
}

func (*ErrEditPrerequisiteFailed) Error

func (e *ErrEditPrerequisiteFailed) Error() string

type StringEnum

type StringEnum interface {
	IsValid() bool
	String() string
}

Jump to

Keyboard shortcuts

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