Documentation
¶
Index ¶
Constants ¶
View Source
const ( TypeText = 1 TypeTextarea = 2 TypePassword = 3 TypeEmail = 4 )
View Source
const (
DefaultTagName = "html"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
RestrictFields map[string]struct{}
ExcludeFields map[string]struct{}
TagName string
IDPrefix string
NamePrefix string
OverwriteValues map[string]string
Values bool
}
Optional configuration for validation: * RestrictFields defines what struct fields should be generated * ExcludeFields defines what struct fields should be excluded from generation * TagName sets tag used to define validation (default is "html") * IDPrefix - if added, an element will contain an 'id' attribute in form of prefix + field name * NamePrefix - use this to put a prefix in the 'name' attribute * OverwriteValues - fill inputs with the specified values * Values - when true then fill inputs with struct instance values
Click to show internal directories.
Click to hide internal directories.