validator

package
v0.0.0-...-c3ae92a Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NumberValidator

type NumberValidator struct {
	PositiveInt bool
}

func NewNumberValidator

func NewNumberValidator() *NumberValidator

func (NumberValidator) Evaluate

func (i NumberValidator) Evaluate(value interface{}) (bool, error)

type StringValidator

type StringValidator struct {
	Expression *regexp.Regexp
}

func NewStringValidator

func NewStringValidator() *StringValidator

func (StringValidator) Evaluate

func (s StringValidator) Evaluate(value interface{}) (bool, error)

type Validator

type Validator interface {
	Evaluate(value interface{}) (bool, error)
}

Jump to

Keyboard shortcuts

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