Documentation ¶
Index ¶
- type O
- type TextValue
- func (v *TextValue) Contains(str string) *TextValue
- func (v *TextValue) DoesNotEndWith(str string) *TextValue
- func (v *TextValue) DoesNotStartWith(str string) *TextValue
- func (v *TextValue) EndsWith(str string) *TextValue
- func (v *TextValue) Is(compare string) *TextValue
- func (v *TextValue) IsAlpha() *TextValue
- func (v *TextValue) IsAlphanumeric() *TextValue
- func (v *TextValue) IsEmail() *TextValue
- func (v *TextValue) IsIPv4() *TextValue
- func (v *TextValue) IsIPv6() *TextValue
- func (v *TextValue) IsOnlyDigits() *TextValue
- func (v *TextValue) MaxLength(length uint) *TextValue
- func (v *TextValue) MinLength(length uint) *TextValue
- func (v *TextValue) Required() *TextValue
- func (v *TextValue) StartsWith(str string) *TextValue
- type ValidationErrors
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type O ¶
type O struct {
// contains filtered or unexported fields
}
func (*O) Errors ¶
func (o *O) Errors() (ValidationErrors, error)
type TextValue ¶
type TextValue struct {
// contains filtered or unexported fields
}
func (*TextValue) DoesNotEndWith ¶
func (*TextValue) DoesNotStartWith ¶
func (*TextValue) IsAlphanumeric ¶
func (*TextValue) IsOnlyDigits ¶
func (*TextValue) StartsWith ¶
type ValidationErrors ¶
type ValidationErrors = []string
func Validate ¶
func Validate(input Validator) (ValidationErrors, error)
type Validator ¶
type Validator interface {
Okay() (ValidationErrors, error)
}
An interface for structs that are going to be validated using okay.Validate, to implement.
Click to show internal directories.
Click to hide internal directories.