Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Field ¶
type Field struct { Name string Type string Label string Description string Choices []Option Value string Errors []string Validators []FieldValidatorFunc }
func (Field) WithValidators ¶
func (f Field) WithValidators(validators ...FieldValidatorFunc) Field
type FieldValidatorFunc ¶
func EqualTo ¶
func EqualTo(expected string) FieldValidatorFunc
func GoodQualityPassword ¶
func GoodQualityPassword(minScore int, dictionary []string) FieldValidatorFunc
func MinLength ¶
func MinLength(n int) FieldValidatorFunc
func OneOf ¶
func OneOf(choices []Option) FieldValidatorFunc
type Form ¶
type Form struct { Fields []Field Errors []string Validators []FormValidatorFunc }
type FormValidatorFunc ¶
func FormFieldsDiffer ¶
func FormFieldsDiffer(a, b, errMsg string) FormValidatorFunc
func FormFieldsEqual ¶
func FormFieldsEqual(a, b, errMsg string) FormValidatorFunc
Click to show internal directories.
Click to hide internal directories.