validator

package
v0.0.0-...-264534e Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package validator implements rules for validating fields.

Package validator implements rules for validating fields.

Index

Constants

This section is empty.

Variables

View Source
var GeneratorMemory = map[string]bool{}

GeneratorMemory is a map used to track the state of generated validators.

Functions

This section is empty.

Types

type FieldPath

type FieldPath string

FieldPath represents a field path with dot-separated components.

func NewFieldPath

func NewFieldPath(components ...string) FieldPath

NewFieldPath creates a new FieldPath from the given components.

func (FieldPath) CleanedPath

func (fp FieldPath) CleanedPath() string

CleanedPath returns the field path with all dots removed for use in variable names and keys.

func (FieldPath) String

func (fp FieldPath) String() string

String returns the string representation of the field path.

type Validator

type Validator interface {
	Validate() string
	FieldName() string
	FieldPath() FieldPath
	Err() string
	ErrVariable() string
	Imports() []string
}

Validator is an interface for validating fields in structs.

Directories

Path Synopsis
Package registry provides a registry system for validators.
Package registry provides a registry system for validators.
initializers
Code generated by generate-validators; DO NOT EDIT.
Code generated by generate-validators; DO NOT EDIT.
Package rules implements validation rules for fields in structs.
Package rules implements validation rules for fields in structs.
Package validatorhelper provides helper functions for the govalid validator.
Package validatorhelper provides helper functions for the govalid validator.

Jump to

Keyboard shortcuts

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