diff --git a/lib/generators/inertia_templates/scaffold/templates/react/form.tsx.tt b/lib/generators/inertia_templates/scaffold/templates/react/form.tsx.tt index 4be21975..34c102fd 100644 --- a/lib/generators/inertia_templates/scaffold/templates/react/form.tsx.tt +++ b/lib/generators/inertia_templates/scaffold/templates/react/form.tsx.tt @@ -28,7 +28,7 @@ export default function Form({ <%= singular_table_name %>, submitText, ...formPr id="password" /> {errors.password && ( -
{errors.password}
+
{errors.password.join(', ')}
)} @@ -42,7 +42,7 @@ export default function Form({ <%= singular_table_name %>, submitText, ...formPr id="password_confirmation" /> {errors.password_confirmation && ( -
{errors.password_confirmation}
+
{errors.password_confirmation.join(', ')}
)} <% else -%> @@ -92,7 +92,7 @@ export default function Form({ <%= singular_table_name %>, submitText, ...formPr /> <% end -%> {errors.<%= attribute.column_name %> && ( -
{errors.<%= attribute.column_name %>}
+
{errors.<%= attribute.column_name %>.join(', ')}
)} <% end -%> diff --git a/lib/generators/inertia_templates/scaffold/templates/svelte/form.ts.svelte.tt b/lib/generators/inertia_templates/scaffold/templates/svelte/form.ts.svelte.tt index 88a916e1..aaf03650 100644 --- a/lib/generators/inertia_templates/scaffold/templates/svelte/form.ts.svelte.tt +++ b/lib/generators/inertia_templates/scaffold/templates/svelte/form.ts.svelte.tt @@ -29,7 +29,7 @@ id="password" /> {#if errors.password} -
{errors.password}
+
{errors.password.join(', ')}
{/if} @@ -41,7 +41,7 @@ id="password_confirmation" /> {#if errors.password_confirmation} -
{errors.password_confirmation}
+
{errors.password_confirmation.join(', ')}
{/if} <% else -%> @@ -82,7 +82,7 @@ /> <% end -%> {#if errors.<%= attribute.column_name %>} -
{errors.<%= attribute.column_name %>}
+
{errors.<%= attribute.column_name %>.join(', ')}
{/if} <% end -%> diff --git a/lib/generators/inertia_templates/scaffold/templates/vue/form.ts.vue.tt b/lib/generators/inertia_templates/scaffold/templates/vue/form.ts.vue.tt index d66fffd4..77bde625 100644 --- a/lib/generators/inertia_templates/scaffold/templates/vue/form.ts.vue.tt +++ b/lib/generators/inertia_templates/scaffold/templates/vue/form.ts.vue.tt @@ -14,7 +14,7 @@ id="password" />
- {{ errors.password }} + {{ errors.password.join(', ') }}
@@ -28,7 +28,7 @@ id="password_confirmation" />
- {{ errors.password_confirmation }} + {{ errors.password_confirmation.join(', ') }}
<% else -%> @@ -69,7 +69,7 @@ /> <% end -%>
- {{ errors.<%= attribute.column_name %> }} + {{ errors.<%= attribute.column_name %>.join(', ') }}
<% end -%> diff --git a/lib/generators/inertia_tw_templates/scaffold/templates/react/form.tsx.tt b/lib/generators/inertia_tw_templates/scaffold/templates/react/form.tsx.tt index 2fe57761..1fbf0206 100644 --- a/lib/generators/inertia_tw_templates/scaffold/templates/react/form.tsx.tt +++ b/lib/generators/inertia_tw_templates/scaffold/templates/react/form.tsx.tt @@ -29,7 +29,7 @@ export default function Form({ <%= singular_table_name %>, submitText, ...formPr /> {errors.password && (
- {errors.password} + {errors.password.join(', ')}
)} @@ -44,7 +44,7 @@ export default function Form({ <%= singular_table_name %>, submitText, ...formPr /> {errors.password_confirmation && (
- {errors.password_confirmation} + {errors.password_confirmation.join(', ')}
)} <% else -%> @@ -99,7 +99,7 @@ export default function Form({ <%= singular_table_name %>, submitText, ...formPr <% end -%> {errors.<%= attribute.column_name %> && (
- {errors.<%= attribute.column_name %>} + {errors.<%= attribute.column_name %>.join(', ')}
)} <% end -%> diff --git a/lib/generators/inertia_tw_templates/scaffold/templates/svelte/form.ts.svelte.tt b/lib/generators/inertia_tw_templates/scaffold/templates/svelte/form.ts.svelte.tt index b3327a9f..66b48a97 100644 --- a/lib/generators/inertia_tw_templates/scaffold/templates/svelte/form.ts.svelte.tt +++ b/lib/generators/inertia_tw_templates/scaffold/templates/svelte/form.ts.svelte.tt @@ -31,7 +31,7 @@ /> {#if errors.password}
- {errors.password} + {errors.password.join(', ')}
{/if} @@ -46,7 +46,7 @@ /> {#if errors.password_confirmation}
- {errors.password_confirmation} + {errors.password_confirmation.join(', ')}
{/if} @@ -95,7 +95,7 @@ <% end -%> {#if errors.<%= attribute.column_name %>}
- {errors.<%= attribute.column_name %>} + {errors.<%= attribute.column_name %>.join(', ')}
{/if} diff --git a/lib/generators/inertia_tw_templates/scaffold/templates/vue/form.ts.vue.tt b/lib/generators/inertia_tw_templates/scaffold/templates/vue/form.ts.vue.tt index f8605632..dc51afa5 100644 --- a/lib/generators/inertia_tw_templates/scaffold/templates/vue/form.ts.vue.tt +++ b/lib/generators/inertia_tw_templates/scaffold/templates/vue/form.ts.vue.tt @@ -19,7 +19,7 @@ v-if="errors.password" class="text-red-500 px-3 py-2 font-medium" > - {{ errors.password }} + {{ errors.password.join(', ') }} @@ -35,7 +35,7 @@ v-if="errors.password_confirmation" class="text-red-500 px-3 py-2 font-medium" > - {{ errors.password_confirmation }} + {{ errors.password_confirmation.join(', ') }} <% else -%> @@ -82,7 +82,7 @@ /> <% end -%>
- {{ errors.<%= attribute.column_name %> }} + {{ errors.<%= attribute.column_name %>.join(', ') }}
<% end -%>