Skip to content

Commit 16ea7e3

Browse files
committed
refactor(FormComponent): update error markup and layout
Replace error divs with <p> elements for name errors and move the submit button inside the email field container. Removes the email label and error display for improved markup consistency.
1 parent 9579a7e commit 16ea7e3

File tree

1 file changed

+2
-8
lines changed
  • packages/svelte5/test-app/Pages/FormComponent/SubmitComplete

1 file changed

+2
-8
lines changed

packages/svelte5/test-app/Pages/FormComponent/SubmitComplete/Redirect.svelte

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,13 @@
1010
<div>
1111
<input type="text" name="name" id="name" placeholder="Name" value="John Doe" />
1212
{#if errors.name}
13-
<div>{errors.name}</div>
13+
<p id="error_name">{errors.name}</p>
1414
{/if}
1515
</div>
1616

1717
<div>
18-
<label for="email">Email</label>
19-
<input type="email" name="email" id="email" value="[email protected]" />
20-
{#if errors.email}
21-
<div>{errors.email}</div>
22-
{/if}
18+
<button type="submit">Submit</button>
2319
</div>
24-
25-
<button type="submit">Submit</button>
2620
{/snippet}
2721
</Form>
2822
</div>

0 commit comments

Comments
 (0)