Documentation
¶
Index ¶
- func Alpha(s string) (string, error)
- func Alphanumeric(s string) (string, error)
- func CompilePattern(pattern string) (*regexp.Regexp, error)
- func Contains(s string, substr string) (string, error)
- func Email(s string) (string, error)
- func EndsWith(s string, suffix string) (string, error)
- func InRange(n int, min int, max int) (int, error)
- func InRangeFloat(n float64, min float64, max float64) (float64, error)
- func Length(s string, n int) (string, error)
- func LengthBetween(s string, min int, max int) (string, error)
- func ListMaxLength(items []any, n int) ([]any, error)
- func ListMinLength(items []any, n int) ([]any, error)
- func Matches(s string, pattern string) (string, error)
- func MatchesCompiled(s string, r *regexp.Regexp) (string, error)
- func Max(n int, max int) (int, error)
- func MaxLength(s string, n int) (string, error)
- func Min(n int, min int) (int, error)
- func MinLength(s string, n int) (string, error)
- func Negative(n int) (int, error)
- func NoHTML(s string) (string, error)
- func NoNullBytes(s string) (string, error)
- func NoWhitespace(s string) (string, error)
- func NonNegative(n int) (int, error)
- func NonZero(n int) (int, error)
- func NotEmpty(s string) (string, error)
- func NotEmptyList(items []any) ([]any, error)
- func Numeric(s string) (string, error)
- func OneOf(s string, allowed ...string) (string, error)
- func ParseBool(s string) (bool, error)
- func ParseFloat(s string) (float64, error)
- func ParseInt(s string) (int, error)
- func ParsePositiveInt(s string) (int, error)
- func Positive(n int) (int, error)
- func PositiveFloat(n float64) (float64, error)
- func Require(s string, fieldName string) (string, error)
- func SafeFilename(s string) (string, error)
- func StartsWith(s string, prefix string) (string, error)
- func URL(s string) (string, error)
- func WithMessage(value string, err error, message string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Alphanumeric ¶
func MatchesCompiled ¶ added in v0.0.8
func NoNullBytes ¶ added in v0.0.8
func NoWhitespace ¶
func NonNegative ¶
func NotEmptyList ¶
func ParseFloat ¶
func ParsePositiveInt ¶
func PositiveFloat ¶
func SafeFilename ¶ added in v0.0.8
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.