Documentation
¶
Index ¶
- func CheckColor(field string, value string) (errs []error)
- func CheckCurrency(field string, value string) (errs []error)
- func CheckEmail(field string, value string) (errs []error)
- func CheckInArray(field string, value string, values ...string) []error
- func CheckInArrayInt(field string, value int, values ...int) []error
- func CheckInsideRange(field string, value float64, min float64, max float64) (errs []error)
- func CheckInsideRangeInt(field string, value int, min int, max int) (errs []error)
- func CheckLanguage(field string, value string) (errs []error)
- func CheckPositive(field string, value float64) (errs []error)
- func CheckPositiveInt(field string, value int) (errs []error)
- func CheckPresent(field string, value string) (errs []error)
- func CheckTimezone(field string, value string) (errs []error)
- func CheckURL(field string, value string) (errs []error)
- func IsValidColor(color string) bool
- func IsValidCurrency(value string) bool
- func IsValidEmail(email string) bool
- func IsValidLang(value string) bool
- func IsValidTimezone(value string) (string, bool)
- func IsValidURL(url string) bool
- type RouteType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckColor ¶
CheckColor returns an error if the value is not a valid hex color
func CheckCurrency ¶
CheckCurrency returns an error if the value is not a known currency
func CheckEmail ¶
CheckEmail returns an error if the value is not a reasonably valid email address
func CheckInArray ¶ added in v0.10.0
CheckInArray returns an error if the value is not in the set of provided values.
func CheckInArrayInt ¶ added in v0.10.0
CheckInArrayInt returns an error if the value is not in the set of provided values.
func CheckInsideRange ¶
CheckInsideRange returns an error if the value is outside of the specified range
func CheckInsideRangeInt ¶
CheckInsideRangeInt returns an error if the value is outside of the specified range
func CheckLanguage ¶
CheckLanguage returns an error if the value is not a known language
func CheckPositive ¶
CheckPositive returns an error if the value is non-negative
func CheckPositiveInt ¶
CheckPositiveInt returns an error if the value is non-negative
func CheckPresent ¶
CheckPresent returns an error if a string is empty
func CheckTimezone ¶
CheckTimezone returns an error if the value is not a known timezone
func IsValidCurrency ¶
IsValidCurrency check is valid currency
func IsValidTimezone ¶
IsValidTimezone check is valid timezone
Types ¶
type RouteType ¶
RouteType contains details on each possible route_type
func GetBasicRouteType ¶
GetBasicRouteType returns the closest approximate basic route_type for an extended route_type.
func GetRouteType ¶
GetRouteType returns the details for a given route_type value.