Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Email ¶
type Email struct {
types.QBase `bson:",inline"`
// AllowedDomains list of allowed domains for the email field.
// Validations:
// - optional
// - if defined, each domain must have a length of at least 1
AllowedDomains []string `json:"allowedDomains,omitempty" bson:"allowedDomains,omitempty" validate:"omitempty,dive,min=1"`
}
Email represents an email question type. QuestionType: types.QTypeEmail
func CastToEmail ¶
CastToEmail casts the given interface to an Email type.
type FreeText ¶
type FreeText struct {
types.QBase `bson:",inline"`
// Min is an optional minimum length for the text area field.
// Validations:
// - optional
// - if defined:
// * must be greater than or equal to 0
// * if max is defined, must be less than to max
Min *int `json:"min,omitempty" bson:"min,omitempty" validate:"omitempty,min=0,ltfield=Max"`
// Max is an optional maximum length for the text area field.
// Validations:
// - optional
// - if defined:
// * must be greater than or equal to 0
// * if min is defined, must be greater than to min
Max *int `json:"max,omitempty" bson:"max,omitempty" validate:"omitempty,min=0,gtfield=Min"`
}
FreeText represents a free text question type. Types: - types.QTypeInputText - types.QTypeTextArea
func CastToFreeText ¶
CastToFreeText casts the given interface to a FreeText type.
type InformationText ¶
type InformationText struct {
types.QBase `bson:",inline"`
// Text is the text to be displayed.
// Validations:
// - required
// - min length: 1
Text string `json:"text,omitempty" bson:"text,omitempty" validate:"required,min=1"`
}
InformationText represents an information text question type. Types: - types.QTypeInformation
type Telephone ¶
type Telephone struct {
types.QBase `bson:",inline"`
// AllowedCountryCodes list of allowed country codes for the telephone field.
// Validations:
// - optional
// - if defined, each country code must have a length of at least 1
AllowedCountryCodes []string `json:"allowedCountryCodes,omitempty" bson:"allowedCountryCodes,omitempty" validate:"omitempty,dive,min=1"`
}
Telephone represents a telephone question type. QuestionType: types.QTypeTelephone
func CastToTelephone ¶
CastToTelephone casts the given interface to a Telephone type.
Click to show internal directories.
Click to hide internal directories.