Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ValidationError ¶
type ValidationError struct { Namespace string `json:"namespace,omitempty"` Field string `json:"field,omitempty"` Error string `json:"error,omitempty"` }
ValidationError represent error from validator
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator struct
func NewValidator ¶
func NewValidator() *Validator
NewValidator create an instance of Validator Struct
func (*Validator) FormatErrors ¶
func (v *Validator) FormatErrors(errs validator.ValidationErrors) []ValidationError
FormatErrors generate list of error
func (*Validator) ValidateStruct ¶
func (v *Validator) ValidateStruct(input interface{}) []ValidationError
ValidateStruct func
Click to show internal directories.
Click to hide internal directories.