Documentation ¶
Index ¶
- func RegisterValidationRule(rule Rule, validate *validator.Validate, trans ut.Translator)
- type CommonRule
- func (rule *CommonRule) GetField() string
- func (rule *CommonRule) GetFieldName() string
- func (rule *CommonRule) GetMessage() string
- func (rule *CommonRule) RegisterFieldNameTranslate(ut ut.Translator, fe validator.FieldError) string
- func (rule *CommonRule) RegisterMessageTranslate(ut ut.Translator) error
- type ExampleRule
- type Rule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterValidationRule ¶
func RegisterValidationRule(rule Rule, validate *validator.Validate, trans ut.Translator)
RegisterValidationRule ...
Types ¶
type CommonRule ¶
CommonRule ...
func (*CommonRule) RegisterFieldNameTranslate ¶
func (rule *CommonRule) RegisterFieldNameTranslate(ut ut.Translator, fe validator.FieldError) string
RegisterFieldNameTranslate ...
func (*CommonRule) RegisterMessageTranslate ¶
func (rule *CommonRule) RegisterMessageTranslate(ut ut.Translator) error
RegisterMessageTranslate ...
type ExampleRule ¶
type ExampleRule struct{ *CommonRule }
ExampleRule ...
func (*ExampleRule) GetRule ¶
func (*ExampleRule) GetRule() func(fl validator.FieldLevel) bool
GetRule ...
Click to show internal directories.
Click to hide internal directories.