Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion pkg/fusionauth/Domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -2611,9 +2611,25 @@ func (b *FormResponse) SetStatus(status int) {
* @author Daniel DeGroff
*/
type FormStep struct {
Fields []string `json:"fields,omitempty"`
Fields []string `json:"fields,omitempty"`
Type FormStepType `json:"type,omitempty"`
}

/**
* Denotes the type of form step. This is used to configure different behavior on form steps in the registration flow.
*/
type FormStepType string

func (e FormStepType) String() string {
return string(e)
}

const (
FormStepType_CollectData FormStepType = "collectData"
FormStepType_VerifyEmail FormStepType = "verifyEmail"
FormStepType_VerifyPhoneNumber FormStepType = "verifyPhoneNumber"
)

/**
* @author Daniel DeGroff
*/
Expand Down
7 changes: 7 additions & 0 deletions pkg/fusionauth/Domain_dynamic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@ func Test_FormFieldAdminPolicyImplementsStringer(t *testing.T) {
}
}

func Test_FormStepTypeImplementsStringer(t *testing.T) {
var enum interface{} = FormStepType("Test")
if _, ok := enum.(fmt.Stringer); !ok {
t.Errorf("FormStepType does not implement stringer interface\n")
}
}

func Test_FormTypeImplementsStringer(t *testing.T) {
var enum interface{} = FormType("Test")
if _, ok := enum.(fmt.Stringer); !ok {
Expand Down