Documentation
¶
Overview ¶
Package validator provides functionality for validating and sanitizing data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MaxDuration ¶
MaxDuration validates if a duration is within the maximum allowed duration.
Types ¶
type Validator ¶
Validator is a struct that contains field errors and a non-field errors.
func (*Validator) AddFieldError ¶
AddFieldError adds an error message to the FieldErrors map.
func (*Validator) AddNonFieldError ¶
AddNonFieldError adds an error message to the NonFieldErrors slice.
func (*Validator) CheckField ¶
CheckField adds an error message to the FieldErrors map only if a validation check is not passed.
Click to show internal directories.
Click to hide internal directories.