Documentation
¶
Index ¶
- func AcceptedRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func AlphaDashRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func AlphaNumRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func AlphaRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func ArrayRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func BetweenRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func BooleanRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func ConfirmedRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func DifferentRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func EmailRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func InRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func IntegerRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func MaxRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func MinRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func NotInRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func NumericRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func SameRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func SizeRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func StringRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func URLPublicRule(field string, value interface{}, params []string, data map[string]interface{}) error
- func URLRule(field string, value interface{}, params []string, data map[string]interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptedRule ¶
func AcceptedRule(field string, value interface{}, params []string, data map[string]interface{}) error
AcceptedRule validates that a field is accepted (yes, on, 1, true)
func AlphaDashRule ¶
func AlphaDashRule(field string, value interface{}, params []string, data map[string]interface{}) error
AlphaDashRule validates that a value contains only alpha-numeric characters, dashes, and underscores
func AlphaNumRule ¶
func AlphaNumRule(field string, value interface{}, params []string, data map[string]interface{}) error
AlphaNumRule validates that a value contains only alpha-numeric characters
func BetweenRule ¶
func BetweenRule(field string, value interface{}, params []string, data map[string]interface{}) error
BetweenRule validates that a value is between min and max
func BooleanRule ¶
func BooleanRule(field string, value interface{}, params []string, data map[string]interface{}) error
BooleanRule validates that a value is a boolean
func ConfirmedRule ¶
func ConfirmedRule(field string, value interface{}, params []string, data map[string]interface{}) error
ConfirmedRule validates that a field has a matching _confirmation field
func DifferentRule ¶
func DifferentRule(field string, value interface{}, params []string, data map[string]interface{}) error
DifferentRule validates that a field is different from another field
func EmailRule ¶
EmailRule validates that a value is a valid email using both regex and net/mail.ParseAddress
func IntegerRule ¶
func IntegerRule(field string, value interface{}, params []string, data map[string]interface{}) error
IntegerRule validates that a value is an integer
func NumericRule ¶
func NumericRule(field string, value interface{}, params []string, data map[string]interface{}) error
NumericRule validates that a value is numeric
func StringRule ¶
func StringRule(field string, value interface{}, params []string, data map[string]interface{}) error
StringRule validates that a value is a string
func URLPublicRule ¶ added in v0.9.2
func URLPublicRule(field string, value interface{}, params []string, data map[string]interface{}) error
URLPublicRule validates that a value is a valid URL pointing to a public (non-internal) host. Rejects private/internal IPs (127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, ::1, fc00::/7).
Types ¶
This section is empty.