Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ValidatorExtension ¶
type ValidatorExtension struct { *validator.FieldValidator // contains filtered or unexported fields }
ValidatorExtension contains the rules set by the (validator.field) method option extension.
func (ValidatorExtension) MarshalJSON ¶
func (v ValidatorExtension) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (ValidatorExtension) Rules ¶
func (v ValidatorExtension) Rules() []ValidatorRule
Rules returns all active rules
type ValidatorRule ¶
type ValidatorRule struct { Name string `json:"name"` Value interface{} `json:"value"` }
ValidatorRule represents a single validator rule from the (validator.field) method option extension.
Click to show internal directories.
Click to hide internal directories.