form

package
v0.0.0-...-ab49a64 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 6 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) ValidateAll

func (form *Form) ValidateAll(ctx *fasthttp.RequestCtx) (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