Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

FieldInfo.svelte

12 lines336 Bytes

1<script lang="ts">
2 import type { AnyFieldApi } from '@tanstack/svelte-form'
3​
4 const { field }: { field: AnyFieldApi } = $props()
5</script>
6​
7{#if field.meta.isTouched && field.meta.isInvalid}
8 <em role="alert">
9 {field.errors.map((error) => error.message).join(', ')}
10 </em>
11{/if}
12{#if field.meta.isValidating}Validating...{/if}