Toolverse
All skills

tanstack-form

by exceptionless

TanStack Form with Zod validation in Svelte 5. Form state management, field validation,\nerror handling, and ProblemDetails integration.\nKeywords: TanStack Form, createForm, Field, form validation, zod schema, form errors,\nonSubmit, onSubmitAsync, problemDetailsToFormErrors

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Category
Frontend
Views
40

About this skill

TanStack Form with Zod validation in Svelte 5. Form state management, field validation,\nerror handling, and ProblemDetails integration.\nKeywords: TanStack Form, createForm, Field, form validation, zod schema, form errors,\nonSubmit, onSubmitAsync, problemDetailsToFormErrors

How to use

  1. Zainstaluj pakiet @tanstack/svelte-form w swoim projekcie Svelte 5 oraz upewnij się, że masz dostępną bibliotekę Zod do walidacji schematów.
  2. Zdefiniuj schemat walidacji Zod w pliku schematów (np. src/lib/features/auth/schemas.ts). Możesz importować wygenerowane schematy z backendu i rozszerzać je o dodatkowe pola lub reguły walidacji za pomocą metody extend() i refine().
  3. W komponencie Svelte zaimportuj funkcję createForm z @tanstack/svelte-form oraz swój schemat walidacji. Utwórz instancję formularza, przekazując schemat jako parametr.
  4. Powiąż pola formularza z komponentami UI (Input, Button) używając komponentu Field. Każde pole automatycznie będzie śledzić swoją wartość i błędy walidacji.
  5. Obsłuż zdarzenie onSubmit lub onSubmitAsync na formularzu. Jeśli backend zwróci błędy w formacie ProblemDetails, użyj funkcji problemDetailsToFormErrors do automatycznego mapowania błędów na odpowiednie pola.
  6. Wyświetl błędy walidacji obok pól formularza, korzystając z funkcji mapFieldErrors do formatowania komunikatów błędów.

Related skills

browser-automation

by browserbase

Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Triggers include \

Frontend
21175

apple-reminders

by openclaw

Manage Apple Reminders via the `remindctl` CLI on macOS (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.

Frontend
2085

theme-factory

by anthropics

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

Frontend
40139

senior-fullstack

by davila7

Comprehensive fullstack development skill for building complete web applications with React, Next.js, Node.js, GraphQL, and PostgreSQL. Includes project scaffolding, code quality analysis, architecture patterns, and complete tech stack guidance. Use when building new projects,

Frontend
2896

frontend-slides

by sickn33

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual

Frontend
65135

frontend-ui-ux

by code-yeongyu

Designer-turned-developer who crafts stunning UI/UX even without design mockups

Frontend
1884