Skip to content

Commit

Permalink
SDK-4929 Updte Form Messages
Browse files Browse the repository at this point in the history
  • Loading branch information
kushalshit27 committed Sep 16, 2024
1 parent e8363da commit a5e7526
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions management/form.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ type FormLanguages struct {

// FormMessages represents custom and error messages of the form.
type FormMessages struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Errors map[string]interface{} `json:"errors,omitempty"`
Custom *map[string]interface{} `json:"custom,omitempty"`
Errors *map[string]interface{} `json:"errors,omitempty"`
}

// FormStyle represents the style of the form.
Expand Down
4 changes: 2 additions & 2 deletions management/form_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ func TestFormManager_MarshalJSON(t *testing.T) {
}: `{"name":"test-form","description":"A test form","languages":{"primary":"en"},"style":{"theme":"SOFT"}}`,
{
Messages: &FormMessages{
Custom: map[string]interface{}{
Custom: &map[string]interface{}{
"welcome": "Welcome to the form",
},
Errors: map[string]interface{}{
Errors: &map[string]interface{}{
"required": "This field is required",
},
},
Expand Down
8 changes: 4 additions & 4 deletions management/management.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions management/management.gen_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a5e7526

Please sign in to comment.