Documentation ¶
Overview ¶
Package form provides types for some common forms.
Code generated by "enumerator -type YesNo -linecomment -trimprefix"; DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FieldNames = SharedFieldNames{ LanguagePreference: "language-preference", Address: AddressFieldNames{ Line1: "address-line-1", Line2: "address-line-2", Line3: "address-line-3", TownOrCity: "address-town", Postcode: "address-postcode", Action: "action", }, YesNo: "yes-no", }
View Source
var YesNoValues = YesNoOptions{ Unknown: YesNoUnknown, Yes: Yes, No: No, }
Functions ¶
func DecodeAddress ¶
Types ¶
type AddressFieldNames ¶ added in v0.943.0
type AddressForm ¶
type AddressForm struct { Action string LookupPostcode string Address *place.Address FieldNames AddressFieldNames }
func NewAddressForm ¶ added in v0.943.0
func NewAddressForm() *AddressForm
func ReadAddressForm ¶
func ReadAddressForm(r *http.Request) *AddressForm
func (*AddressForm) Validate ¶
func (f *AddressForm) Validate(useYour bool) validation.List
type LanguagePreferenceForm ¶ added in v0.884.0
func ReadLanguagePreferenceForm ¶ added in v0.884.0
func ReadLanguagePreferenceForm(r *http.Request, errorLabel string) *LanguagePreferenceForm
func (*LanguagePreferenceForm) Validate ¶ added in v0.884.0
func (f *LanguagePreferenceForm) Validate() validation.List
type SharedFieldNames ¶ added in v0.943.0
type SharedFieldNames struct {}
type YesNo ¶
type YesNo uint8
func ParseYesNo ¶
func (YesNo) MarshalText ¶ added in v0.912.0
func (*YesNo) UnmarshalText ¶ added in v0.1095.0
type YesNoForm ¶
type YesNoForm struct { YesNo YesNo Error error ErrorLabel string Options YesNoOptions FieldName string }
func NewYesNoForm ¶ added in v0.947.0
func (*YesNoForm) Validate ¶
func (f *YesNoForm) Validate() validation.List
type YesNoOptions ¶
Click to show internal directories.
Click to hide internal directories.