validation

package module
v0.0.0-...-9cadd26 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 12 Imported by: 0

README

validation

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Form

type Form struct {
	validation.Form
	// contains filtered or unexported fields
}

Form abstract form

func (*Form) AddError

func (f *Form) AddError(key, message string)

AddError add error

func (*Form) CustomRules

func (f *Form) CustomRules() support.List[validation.Rule]

CustomRules custom rules

func (*Form) Empty

func (f *Form) Empty() bool

Empty empty

func (*Form) Errors

func (f *Form) Errors() map[string][]string

Errors errors

func (*Form) Fails

func (f *Form) Fails() bool

Fails fails

func (*Form) Locale

func (f *Form) Locale() string

Locale get locale

func (*Form) SetLocale

func (f *Form) SetLocale(locale string)

SetLocale set locale

type ServerProvider

type ServerProvider struct {
	support.ServerProvider
}

ServerProvider validation server provider

func (*ServerProvider) Register

func (s *ServerProvider) Register(c container.Container)

Register register

func (*ServerProvider) Validator

func (s *ServerProvider) Validator(c container.Container) *Validator

Validator get validator instance

type Validator

type Validator struct {
	*validator.Validate
	Translator *ut.UniversalTranslator
}

Validator validator

func NewValidator

func NewValidator() *Validator

NewValidator new validator

func (*Validator) ValidateForm

func (v *Validator) ValidateForm(form validation.Form)

ValidateForm validate form

Jump to

Keyboard shortcuts

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