Documentation
¶
Index ¶
- Variables
- func CursorRule(field string, rule string, message string, value interface{}) error
- func EOSBlockNumRule(field string, rule string, message string, value interface{}) error
- func EOSExtendedNameRule(field string, rule string, message string, value interface{}) error
- func EOSNameRule(field string, rule string, message string, value interface{}) error
- func EOSTrxIDRule(field string, rule string, message string, value interface{}) error
- func ExplodeNames(input string, sep string) (names []string)
- func HexRule(field string, rule string, message string, value interface{}) error
- func HexSliceRule(field string, rule string, message string, value interface{}) error
- func IsValidExtendedName(input string) bool
- func IsValidName(input string) bool
- func ValidateJSONBody(r *http.Request, data interface{}, rules Rules, options ...Option) url.Values
- func ValidateQueryParams(r *http.Request, rules Rules, options ...Option) url.Values
- func ValidateStruct(data interface{}, rules Rules, options ...Option) url.Values
- type MessagesOption
- type Option
- type Rule
- type Rules
- type TagIdentifierOption
Constants ¶
This section is empty.
Variables ¶
View Source
var HexRowRule = HexRule
Deprecated: Use `HexRule` instead
View Source
var HexRowsRule = HexSliceRule
Deprecated: Use `HexRowsRule` instead
Functions ¶
func CursorRule ¶
func EOSBlockNumRule ¶
func EOSExtendedNameRule ¶
func EOSNameRule ¶
func EOSTrxIDRule ¶
func ExplodeNames ¶
func HexSliceRule ¶
func IsValidExtendedName ¶
func IsValidName ¶
FIXME: Use eso-go IsValidName once merged, not perfect Regex for now, 13 characters if present is restricted to a different subset
func ValidateJSONBody ¶
func ValidateQueryParams ¶
Types ¶
type MessagesOption ¶
MessagesOption represents the set of messages to return explicitely for each validation, defaults to `nil` when undefined (predefined messages are used).
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option represents an option that can be set on the validator to alter it's behavior
type Rule ¶
func DateTimeRuleFactory ¶
func EOSNamesListRuleFactory ¶
type TagIdentifierOption ¶
type TagIdentifierOption string
TagIdentifierOption represents the tag to use when inspecting a struct to determine the field name, defaults to `json` when undefined.
Click to show internal directories.
Click to hide internal directories.