Skip to content

Commit

Permalink
[TM-950] Allow the collection for linked fields to get stored in the …
Browse files Browse the repository at this point in the history
…DB form question.
  • Loading branch information
roguenet committed May 28, 2024
1 parent 942a4ed commit d87a3fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Http/Requests/V2/Forms/StoreFormRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function rules()

'form_sections.*.form_questions' => ['sometimes', 'array'],
'form_sections.*.form_questions.*.linked_field_key' => ['sometimes', 'nullable', 'string'],
'form_sections.*.form_questions.*.collection' => ['sometimes', 'nullable', 'string'],
'form_sections.*.form_questions.*.label' => ['required', 'string'],
'form_sections.*.form_questions.*.input_type' => ['sometimes', 'nullable'],
'form_sections.*.form_questions.*.name' => ['sometimes', 'nullable'],
Expand All @@ -58,6 +59,7 @@ public function rules()

'form_sections.*.form_questions.*.child_form_questions' => ['sometimes'],
'form_sections.*.form_questions.*.child_form_questions.*.linked_field_key' => ['sometimes', 'required', 'string'],
'form_sections.*.form_questions.*.child_form_questions.*.collection' => ['sometimes', 'nullable', 'string'],
'form_sections.*.form_questions.*.child_form_questions.*.label' => ['sometimes', 'required', 'string'],
'form_sections.*.form_questions.*.child_form_questions.*.name' => ['sometimes', 'nullable'],
'form_sections.*.form_questions.*.child_form_questions.*.input_type' => ['sometimes', 'nullable'],
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Requests/V2/Forms/UpdateFormRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function rules()

'form_sections.*.form_questions' => ['sometimes', 'nullable', 'array'],
'form_sections.*.form_questions.*.linked_field_key' => ['sometimes', 'nullable', 'string'],
'form_sections.*.form_questions.*.collection' => ['sometimes', 'nullable', 'string'],
'form_sections.*.form_questions.*.label' => ['sometimes', 'nullable', 'string'],
'form_sections.*.form_questions.*.uuid' => ['sometimes', 'nullable', 'string'],
'form_sections.*.form_questions.*.name' => ['sometimes', 'nullable'],
Expand Down Expand Up @@ -63,6 +64,7 @@ public function rules()
'form_sections.*.form_questions.*.child_form_questions' => ['sometimes', 'nullable'],
'form_sections.*.form_questions.*.child_form_questions.*.uuid' => ['sometimes', 'nullable', 'string'],
'form_sections.*.form_questions.*.child_form_questions.*.linked_field_key' => ['sometimes', 'nullable', 'string'],
'form_sections.*.form_questions.*.child_form_questions.*.collection' => ['sometimes', 'nullable', 'string'],
'form_sections.*.form_questions.*.child_form_questions.*.label' => ['sometimes', 'nullable', 'string'],
'form_sections.*.form_questions.*.child_form_questions.*.name' => ['sometimes', 'nullable'],
'form_sections.*.form_questions.*.child_form_questions.*.input_type' => ['sometimes', 'nullable'],
Expand Down

0 comments on commit d87a3fa

Please sign in to comment.