form

package
v0.0.0-...-0fc7f2f Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name      string
	Title     string
	MinLength string
	MaxLength string
	Checks    []validator.Check
}

type Form

type Form struct {
	Name         string
	Prefix       string
	Required     []string
	DontValidate []string
	FieldsOrder  []string
	Fields       map[string]*Field
	UIs          map[string]*UI
	Validator    validator.Validator
}

func (*Form) AddCsrfField

func (form *Form) AddCsrfField(value string)

func (*Form) AddField

func (form *Form) AddField(fd *Field)

func (*Form) ImportTable

func (form *Form) ImportTable(table *orm.Table, tableT *orm.Dictio, extRefs bool, quickList []string, notRequired []string, prefix string)

func (*Form) SetupForm

func (form *Form) SetupForm()

func (*Form) ValidateAllCtx

func (form *Form) ValidateAllCtx(ctx *fasthttp.RequestCtx) (bool, map[string]string, []string)

func (*Form) ValidateAllMap

func (form *Form) ValidateAllMap(POST_ map[string]string) (bool, map[string]string, []string)

func (*Form) ValidateField

func (form *Form) ValidateField(k string, value string) bool

type UI

type UI struct {
	Attrs      map[string]string
	Default    string
	Widget     string
	WsUrl      string
	WsCallback string
	Opts       []map[string]string
}

Jump to

Keyboard shortcuts

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