Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field interface { // Type defines the type of the field Type() *FieldType // Name defines the name of the field Name() string // Label defines a label suitable to be displayed to users Label() string // Help defines a text that gives hints to users Help() string // Placeholder defines a text used for placeholder attribute Placeholder() string // Rules defines a slice of rules that will be applied to check whether a value for the field is valid Rules() []rule.Rule }
Field defines the configuration of a single attribute of an entity
type FieldType ¶
type FieldType struct {
// contains filtered or unexported fields
}
FieldType defines the type of the field
var ( // Date defines the checkbox field Date *FieldType = &FieldType{"DATE"} // Email defines the email field Email *FieldType = &FieldType{"EMAIL"} // Mobile defines the mobile field Mobile *FieldType = &FieldType{"MOBILE"} // MultiSelection defines the multi selection field MultiSelection *FieldType = &FieldType{"MULTI_SELECTION"} // Number defines the number field Number *FieldType = &FieldType{"NUMBER"} // SingleSelection defines the single selection field SingleSelection *FieldType = &FieldType{"SINGLE_SELECTION"} // Text defines the text field Text *FieldType = &FieldType{"TEXT"} )
func NewFieldType ¶
NewFieldType creates an instance of FieldType
Click to show internal directories.
Click to hide internal directories.