validators

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorMessage_Default = "field value is invalid"

	ErrorMessage_Required = "value is required"
	ErrorMessage_UUID     = "value must be a valid UUID"
	ErrorMessage_Equals   = "value must be equal to '%s'"
	ErrorMessage_Laptime  = "value must be a valid laptime 'MM:SS:mmm'"
	ErrorMessage_HTTP_URL = "value must a valid http url"
)

Functions

This section is empty.

Types

type Setup

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

func NewSetup

func NewSetup() *Setup

func (*Setup) Validate

func (s *Setup) Validate(setup *models.Setup, skipContent bool) error

type ValidationError

type ValidationError struct {
	Field string      `json:"field"`
	Value interface{} `json:"value"`
	Err   string      `json:"error"`
}

type ValidationErrors

type ValidationErrors []ValidationError

func (ValidationErrors) Error

func (ve ValidationErrors) Error() string

Jump to

Keyboard shortcuts

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