Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Required = RequiredRule{} Slug = SlugRule{} UUID = UUIDRule{} MinValue = func(min int) MinValueRule { return MinValueRule{min: min} } )
Common rules that can be reused
Functions ¶
This section is empty.
Types ¶
type MinValueRule ¶
type MinValueRule struct {
// contains filtered or unexported fields
}
func (MinValueRule) Validate ¶
func (r MinValueRule) Validate(value interface{}) error
type RequiredRule ¶
type RequiredRule struct{}
func (RequiredRule) Validate ¶
func (r RequiredRule) Validate(value interface{}) error
type ValidationError ¶
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
type ValidationErrors ¶
type ValidationErrors []ValidationError
func (ValidationErrors) Error ¶
func (e ValidationErrors) Error() string
Click to show internal directories.
Click to hide internal directories.