Skip to content

Commit 7764396

Browse files
committed
Updated README and demo - fixed autoformat errors
1 parent e3ef73f commit 7764396

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@ _[demo/Basic.svelte](https://github.com/cloudedots-projects/svelte-forms/blob/ma
4343
}
4444
</script>
4545

46-
<form on:submit|preventDefault="{onSubmit}">
46+
<form on:submit|preventDefault={onSubmit}>
4747
<input
4848
type="text"
4949
name="email"
50-
bind:value="{$form.email}"
50+
bind:value={$form.email}
5151
use:formControl
5252
/>
5353
<input
5454
type="password"
5555
name="password"
56-
bind:value="{$form.password}"
56+
bind:value={$form.password}
5757
use:formControl
5858
/>
5959

60-
<button type="submit" disabled="{!$isValid}">Submit</button>
60+
<button type="submit" disabled={!$isValid}>Submit</button>
6161
</form>
6262
```
6363

@@ -156,12 +156,12 @@ _[demo/Full.svelte](https://github.com/cloudedots-projects/svelte-forms/blob/mas
156156
$: console.log($form, $state); // Log Form Data and Form State on every Change
157157
</script>
158158

159-
<form on:submit|preventDefault="{onSubmit}">
159+
<form on:submit|preventDefault={onSubmit}>
160160

161161
<input
162162
placeholder="Title"
163163
name="title"
164-
bind:value="{$form.title}"
164+
bind:value={$form.title}
165165
use:formControl
166166
/>
167167
{#if $state.title._errors?.length}
@@ -173,7 +173,7 @@ _[demo/Full.svelte](https://github.com/cloudedots-projects/svelte-forms/blob/mas
173173
<input
174174
placeholder="Description"
175175
name="description"
176-
bind:value="{$form.description}"
176+
bind:value={$form.description}
177177
use:formControl
178178
/>
179179
{#if $state.description._errors?.length}
@@ -185,15 +185,15 @@ _[demo/Full.svelte](https://github.com/cloudedots-projects/svelte-forms/blob/mas
185185
{#each $form.users as user, index}
186186
<h2>
187187
User {user.name}
188-
<button type="button" on:click="{removeUser(i)}">
188+
<button type="button" on:click={removeUser(i)}>
189189
Remove User
190190
</button>
191191
</h2>
192192

193193
<input
194194
placeholder="name"
195195
name="users[{index}].name"
196-
bind:value="{user.name}"
196+
bind:value={user.name}
197197
use:formControl
198198
/>
199199
{#if $state.users[index].name._errors?.length}
@@ -205,7 +205,7 @@ _[demo/Full.svelte](https://github.com/cloudedots-projects/svelte-forms/blob/mas
205205
<input
206206
placeholder="email"
207207
name="users[{index}].email"
208-
bind:value="{user.email}"
208+
bind:value={user.email}
209209
use:formControl
210210
/>
211211
{#if $state.users[index].email._errors?.length}
@@ -261,7 +261,7 @@ _[demo/UserAddressForm.svelte](https://github.com/cloudedots-projects/svelte-for
261261
<input
262262
type="text"
263263
placeholder="State"
264-
bind:value="{$form.users[index].address.state}"
264+
bind:value={$form.users[index].address.state}
265265
name="users[{index}].address.state"
266266
use:formControl
267267
/>
@@ -274,7 +274,7 @@ _[demo/UserAddressForm.svelte](https://github.com/cloudedots-projects/svelte-for
274274
<input
275275
type="text"
276276
placeholder="City"
277-
bind:value="{$form.users[index].address.city}"
277+
bind:value={$form.users[index].address.city}
278278
name="users[{index}].address.city"
279279
use:formControl
280280
/>

demo/UserAddressForm.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<input
99
type="text"
1010
placeholder="State"
11-
bind:value="{$form.users[index].address.state}"
11+
bind:value={$form.users[index].address.state}
1212
name="users[{index}].address.state"
1313
use:formControl
1414
/>
@@ -21,7 +21,7 @@
2121
<input
2222
type="text"
2323
placeholder="City"
24-
bind:value="{$form.users[index].address.city}"
24+
bind:value={$form.users[index].address.city}
2525
name="users[{index}].address.city"
2626
use:formControl
2727
/>

0 commit comments

Comments
 (0)