Documentation
¶
Index ¶
- func ConvertFormDataToHTMLTypeMap(data map[string][]string) (map[string]HTMLType, error)
- func FieldValueIsValid(field Field, value interface{}) ([]error, error)
- func GetCleanData(form Form, values map[string]HTMLType) (map[string]interface{}, error)
- func RenderFormAsP(form Form, formErrs []error, fieldsErrs map[string][]error) (string, error)
- func RenderFormAsTable(form Form, formErrs []error, fieldsErrs map[string][]error) (string, error)
- func RenderFormAsUL(form Form, formErrs []error, fieldsErrs map[string][]error) (string, error)
- func ValuesAreValid(form Form, values map[string]interface{}) ([]error, map[string][]error, error)
- type Field
- type FieldValidationFunc
- type Form
- type HTMLType
- type ValidationFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FieldValueIsValid ¶
func GetCleanData ¶
func RenderFormAsP ¶
func RenderFormAsTable ¶
func RenderFormAsUL ¶
Types ¶
type Field ¶
type Field interface { HTML() (string, error) GoTypeToHTMLType(value interface{}) (HTMLType, error) HTMLTypeToGoType(value HTMLType) (interface{}, error) RegisterValidationFunctions(validationFuncs ...FieldValidationFunc) GetValidationFunctions() []FieldValidationFunc GetName() string RegisterName(name string) error RegisterInitialValue(value interface{}) SetSupersedingAttribute(name string, value *string) RegisterLabel(label string) error GetLabel() string }
type FieldValidationFunc ¶
type Form ¶
type Form interface { AddField(name string, field Field) error GetFields() []Field RegisterValidationFunctions(validationFuncs ...ValidationFunc) GetValidationFunctions() []ValidationFunc RegisterInitialValues(values map[string]interface{}) error Save(values map[string]HTMLType) (interface{}, error) }
type ValidationFunc ¶
Click to show internal directories.
Click to hide internal directories.