Skip to content

Commit 5b2cb50

Browse files
ユーザー登録ページ エラー時に入力値を再表示する #6
1 parent 0df5f3a commit 5b2cb50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/routes/register/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<h1>Register</h1>
88

99
<form method="POST">
10-
<input type="text" name="username" placeholder="Username" required />
11-
<input type="email" name="email" placeholder="email" required />
10+
<input type="text" name="username" placeholder="Username" required value={form?.username ?? ''} />
11+
<input type="email" name="email" placeholder="email" required value={form?.email ?? ''} />
1212
<input type="password" name="password" placeholder="Password" required />
1313

1414
{#if form?.missing}<p class="error">Username, email and password are required.</p>{/if}

0 commit comments

Comments
 (0)