Skip to content

Commit

Permalink
Dictionary fields were not displaying errors
Browse files Browse the repository at this point in the history
  • Loading branch information
afonic committed Jan 30, 2025
1 parent a84db65 commit 450c228
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ class="size-4"
</div>
</div>
</div>
@if (array_key_exists('instructions', $field))
<p id="{{ $field['handle'] }}-explanation" class="mt-2 text-gray-500">
{{ __($field['instructions']) }}
</p>
@endif
@if ($errors->has('form.' . $field['handle']))
<p class="mt-2 text-red-600">{{ implode(', ', $errors->get('form.' . $field['handle'])) }}</p>
@endif
</div>

@script
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ class="w-full border-gray-300 rounded-r-md border rounded-l-none bg-gray-50 p-2.
/>
</div>
</div>
@if (array_key_exists('instructions', $field))
<p id="{{ $field['handle'] }}-explanation" class="mt-2 text-gray-500">
{{ __($field['instructions']) }}
</p>
@endif
@if ($errors->has('form.' . $field['handle']))
<p class="mt-2 text-red-600">{{ implode(', ', $errors->get('form.' . $field['handle'])) }}</p>
@endif
</div>

@script
Expand Down

0 comments on commit 450c228

Please sign in to comment.