You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<script lang ="ts">
import {createForm} from "@tanstack/svelte-form"
const form = createForm({
defaultValues: {
age: 0
},
onSubmit(values) {
alert(JSON.stringify(values))
}
});
$: Field = form.Field;
</script>
<Field name="age" onChange={val => val < 13 ? "You must be 13 to make an account" : undefined}>
<svelte:fragment let:field>
<input value={field.state.value}/>
</svelte:fragment>
</Field>
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: