Documentation ¶
Index ¶
- Constants
- type ValidationFn
- type Validator
- func CIDR() *Validator
- func FileExists() *Validator
- func IP(allowZeroAddress bool) *Validator
- func MinorVersionNumber() *Validator
- func NoSeparator() *Validator
- func NonLegacyProjectRole() *Validator
- func RFC3339SecondsOnly() *Validator
- func RecordSet() *Validator
- func Rrule() *Validator
- func UUID() *Validator
- func VersionNumber() *Validator
Constants ¶
View Source
const ( MajorMinorVersionRegex = `^\d+\.\d+?$` FullVersionRegex = `^\d+\.\d+.\d+?$` )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ValidationFn ¶
type ValidationFn func(context.Context, validator.StringRequest, *validator.StringResponse)
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func FileExists ¶ added in v0.38.0
func FileExists() *Validator
func IP ¶
IP returns a validator that checks, if the given string is a valid IP address. The allowZeroAddress parameter defines, if 0.0.0.0, resp. [::] should be considered valid.
func MinorVersionNumber ¶
func MinorVersionNumber() *Validator
func NoSeparator ¶
func NoSeparator() *Validator
func NonLegacyProjectRole ¶ added in v0.26.0
func NonLegacyProjectRole() *Validator
func RFC3339SecondsOnly ¶ added in v0.4.0
func RFC3339SecondsOnly() *Validator
func VersionNumber ¶ added in v0.18.0
func VersionNumber() *Validator
func (*Validator) MarkdownDescription ¶
func (*Validator) ValidateString ¶
func (v *Validator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)
Click to show internal directories.
Click to hide internal directories.