Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalid = errors.New("object is invalid")
View Source
var ErrNilObject = errors.New("object is nil")
View Source
var Validate = validator.New(validator.WithRequiredStructEnabled())
Functions ¶
func IsValid ¶
IsValid will check if an object is valid according to the validation tags on the object. It does not return any details of validation issues, only a boolean for valid (true) or invalid (false).
func SanitizeString ¶
SanitizeString attempts to "sanitize" a string value. It will strip any leading/trailing whitespace and then run the string through bluemonday to remove dangerous components. This should retain HTML5 content.
Types ¶
Click to show internal directories.
Click to hide internal directories.