Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterBytesFilter(name string, fn func(v []byte) ([]byte, bool))
- func RegisterBytesFilterWithDescription(name string, fn func(v []byte) ([]byte, bool), description string)
- func RegisterRegexp(name string, rp *regexp.Regexp)
- type CustomField
- type Defaulter
- type FormError
- type Former
- type Rule
- type Rules
Constants ¶
View Source
const ( MissingRequired = _FormErrorType(iota) BadValue )
Variables ¶
View Source
var CustomFormError func(fe *FormError) string
View Source
var ErrPeekManyValuesFromURLParamsOrCookie = errors.New("sha.validator: peek many values from URLParams or cookie")
View Source
var MarkdownTableHeader = "\n|name|type|required|string length range|int value range|list size range|default|regexp|function|description|\n"
View Source
var ParseBool func(v []byte) (bool, error)
Functions ¶
func RegisterRegexp ¶
Types ¶
type CustomField ¶
type FormError ¶
type FormError struct { FormName string Type _FormErrorType }
func (*FormError) StatusCode ¶
type Former ¶
type Former interface { URLParam(name string) ([]byte, bool) QueryValue(name string) ([]byte, bool) QueryValues(name string) [][]byte BodyValue(name string) ([]byte, bool) BodyValues(name string) [][]byte FormValue(name string) ([]byte, bool) FormValues(name string) [][]byte HeaderValue(name string) ([]byte, bool) HeaderValues(name string) [][]byte CookieValue(name string) ([]byte, bool) }
Click to show internal directories.
Click to hide internal directories.