vstring

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alpha added in v0.3.0

func Alpha(name string, value string) (stop bool, err error)

func Alphanumeric added in v0.3.0

func Alphanumeric(name string, value string) (stop bool, err error)

func Base64 added in v0.14.1

func Base64(name string, value string) (stop bool, err error)

func Base64Raw added in v0.14.2

func Base64Raw(name string, value string) (stop bool, err error)

func Base64RawURL added in v0.14.1

func Base64RawURL(name string, value string) (stop bool, err error)

func Base64URL added in v0.14.1

func Base64URL(name string, value string) (stop bool, err error)

func Between added in v0.4.0

func Between(min, max int) yav.ValidateFunc[string]

func ContainsAlpha

func ContainsAlpha(name string, value string) (stop bool, err error)

func ContainsDigit

func ContainsDigit(name string, value string) (stop bool, err error)

func ContainsLowerAlpha

func ContainsLowerAlpha(name string, value string) (stop bool, err error)

func ContainsSpecialCharacter

func ContainsSpecialCharacter(name string, value string) (stop bool, err error)

func ContainsUpperAlpha

func ContainsUpperAlpha(name string, value string) (stop bool, err error)

func E164 added in v0.3.0

func E164(name string, value string) (stop bool, err error)

func Email added in v0.3.0

func Email(name string, value string) (stop bool, err error)

func EndsWithAlpha

func EndsWithAlpha(name string, value string) (stop bool, err error)

func EndsWithDigit

func EndsWithDigit(name string, value string) (stop bool, err error)

func EndsWithLowerAlpha

func EndsWithLowerAlpha(name string, value string) (stop bool, err error)

func EndsWithSpecialCharacter

func EndsWithSpecialCharacter(name string, value string) (stop bool, err error)

func EndsWithUpperAlpha

func EndsWithUpperAlpha(name string, value string) (stop bool, err error)

func Equal

func Equal(parameter string) yav.ValidateFunc[string]

func ExcludedIf added in v0.9.4

func ExcludedIf(conditionString string, condition bool) yav.ValidateFunc[string]

func ExcludedUnless added in v0.9.4

func ExcludedUnless(conditionString string, condition bool) yav.ValidateFunc[string]

func ExcludedWithAll added in v0.9.4

func ExcludedWithAll() accumulators.ExcludedWithAll[string]

func ExcludedWithAny added in v0.9.4

func ExcludedWithAny() accumulators.ExcludedWithAny[string]

func ExcludedWithoutAll added in v0.9.4

func ExcludedWithoutAll() accumulators.ExcludedWithoutAll[string]

func ExcludedWithoutAny added in v0.9.4

func ExcludedWithoutAny() accumulators.ExcludedWithoutAny[string]

func ExcludesWhitespace

func ExcludesWhitespace(name string, value string) (stop bool, err error)

func FQDN added in v0.9.0

func FQDN(name string, value string) (stop bool, err error)

func Hostname added in v0.3.0

func Hostname(name string, value string) (stop bool, err error)

func HostnamePort added in v0.3.0

func HostnamePort(name string, value string) (stop bool, err error)

func HostnameRFC1123 added in v0.3.0

func HostnameRFC1123(name string, value string) (stop bool, err error)

func Lowercase added in v0.3.0

func Lowercase(name string, value string) (stop bool, err error)

func Max

func Max(parameter int) yav.ValidateFunc[string]

func Min

func Min(parameter int) yav.ValidateFunc[string]

func NotEqual added in v0.9.1

func NotEqual(parameter string) yav.ValidateFunc[string]

func Numeric added in v0.9.0

func Numeric(name string, value string) (stop bool, err error)

func OmitEmpty

func OmitEmpty(_ string, value string) (stop bool, err error)

func OneOf

func OneOf(parameters ...string) yav.ValidateFunc[string]

func Regexp added in v0.9.0

func Regexp(re *regexp.Regexp) yav.ValidateFunc[string]

Regexp validates string value using regexp.Regexp.MatchString. That means the value must contain any match of the regular expression re. Wrap your expression with ^...$ to test the value for a full match.

func Required

func Required(name string, value string) (stop bool, err error)

func RequiredIf added in v0.9.0

func RequiredIf(conditionString string, condition bool) yav.ValidateFunc[string]

func RequiredUnless added in v0.9.0

func RequiredUnless(conditionString string, condition bool) yav.ValidateFunc[string]

func RequiredWithAll

func RequiredWithAll() accumulators.RequiredWithAll[string]

func RequiredWithAny

func RequiredWithAny() accumulators.RequiredWithAny[string]

func RequiredWithoutAll

func RequiredWithoutAll() accumulators.RequiredWithoutAll[string]

func RequiredWithoutAny

func RequiredWithoutAny() accumulators.RequiredWithoutAny[string]

func StartsWithAlpha

func StartsWithAlpha(name string, value string) (stop bool, err error)

func StartsWithDigit

func StartsWithDigit(name string, value string) (stop bool, err error)

func StartsWithLowerAlpha

func StartsWithLowerAlpha(name string, value string) (stop bool, err error)

func StartsWithSpecialCharacter

func StartsWithSpecialCharacter(name string, value string) (stop bool, err error)

func StartsWithUpperAlpha

func StartsWithUpperAlpha(name string, value string) (stop bool, err error)

func Text added in v0.3.0

func Text(name string, value string) (stop bool, err error)

Text validates string value using common.IsText.

func Title added in v0.3.0

func Title(name string, value string) (stop bool, err error)

Title validates string value using common.IsTitle.

func URI added in v0.3.0

func URI(name string, value string) (stop bool, err error)

func URL added in v0.3.0

func URL(name string, value string) (stop bool, err error)

func UUID added in v0.3.0

func UUID(name string, value string) (stop bool, err error)

func Uppercase added in v0.3.0

func Uppercase(name string, value string) (stop bool, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL