Documentation
¶
Index ¶
- func Feature(config ...func(*Installer)) setup.Feature
- type Constraints
- type Installer
- type Rules
- type TypeRules
- type Validates
- type Validates1
- type Validates2
- type Validates3
- type Validates4
- type Validates5
- type Validates6
- type Validates7
- type Validates8
- type Validates9
- type Validator
- func (v *Validator) Constructor(validate *play.Validate, _ *struct{ args.Optional }, translator ut.Translator)
- func (v *Validator) Validate(target any, outcome *validates.Outcome) miruken.HandleResult
- func (v *Validator) ValidateAndStop(target any, outcome *validates.Outcome) miruken.HandleResult
- func (v *Validator) WithRules(rules Rules, configure func(*play.Validate) error, translator ut.Translator) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Constraints ¶ added in v0.30.80
Constraints express the validation rules without depending on validation struct tags.
type Installer ¶
type Installer struct {
// contains filtered or unexported fields
}
Installer integrates validation support for the go playground validator. https://github.com/go-playground/validator/
func (*Installer) UseTranslator ¶
func (i *Installer) UseTranslator(translator ut.Translator)
type TypeRules ¶ added in v0.30.27
type TypeRules struct { Type any Constraints Constraints }
TypeRules express the validation Constraints for a type.
type Validates ¶ added in v0.30.32
Validates handles validation for a specific type. We duplicate the definitions below to allow multiple validations for a single type. We take advantage of GO composition to inject a validation handle method. Methods are only composed if it appears once. Therefore, we duplicate the validators and define a unique method i.e. Validate1, Validate2, ...
type Validates1 ¶ added in v0.30.32
Validates1 handles validation for a specific type.
type Validates2 ¶ added in v0.30.32
Validates2 handles validation for a specific type.
type Validates3 ¶ added in v0.30.32
Validates3 handles validation for a specific type.
type Validates4 ¶ added in v0.30.32
Validates4 handles validation for a specific type.
type Validates5 ¶ added in v0.30.32
Validates5 handles validation for a specific type.
type Validates6 ¶ added in v0.30.69
Validates6 handles validation for a specific type.
type Validates7 ¶ added in v0.30.69
Validates7 handles validation for a specific type.
type Validates8 ¶ added in v0.30.69
Validates8 handles validation for a specific type.
type Validates9 ¶ added in v0.30.69
Validates9 handles validation for a specific type.
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator provides core validation behavior.