Documentation ¶
Index ¶
- type Form
- func (f *Form) Has(field string) bool
- func (f *Form) IsEmail(field string)
- func (f *Form) MinLength(field string, length int) bool
- func (f *Form) MinValueFloat64(field string, value float64) bool
- func (f *Form) MinValueInt64(field string, value int64) bool
- func (f *Form) Required(fields ...string)
- func (f *Form) Valid() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Form ¶
Form holds URL values which essentially are Values maps a string key to a list of values. It is typically used for query parameters and form values. Unlike in the http.Header map, the keys in a Values map are case-sensitive and errors associated with form fields.
func New ¶
New creates a new form based on query parameter, or form value data (i.e. url.Values) and empty error map.
func (*Form) MinLength ¶
MinLength checks if a specific field has at least 'length' (a function parameter) characters.
func (*Form) MinValueFloat64 ¶
MinValueFloat64 checks if a specific field is greater or equal then specified value.
func (*Form) MinValueInt64 ¶
MinValueInt64 checks if a specific field is greater or equal then specified value.