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
{{ message }}
Repository navigation
Feature: Preflight Client-Only Form Validation without Remote Function #15136
We need a client only form validator. While this should be in Svelte and not Kit eventually, all the code is already there for SvelteKit to allow this.
A perfect obvious example is submitting a form to Firebase. Firebase does not need a server, as you can submit directly to their API using the Firebase SDK on the client (with Firestore Rules etc). Granted, you can't use progressive enhancements, but that is part of an external API with JS.
Describe the proposed solution
There really doesn't have to be much changes in the UI.
<scriptlang="ts">import{preflight}from'$app/client';import{profileSchema}from'$lib/profile-schema';constprofileForm=preflight(profileSchema);typeSubmitRemoteFunction=Parameters<typeofprofileForm.enhance>[0];constonSubmit: SubmitRemoteFunction=async({ data })=>{// submit to firebase or whatever external APIalert('Profile updated successfully with: '+JSON.stringify(data));};</script><form{...preflight(profileSchema).submit(onSubmit)}><input{...profileForm.fields.name.as('text')}
oninput={() => profileForm.validate()}
/></form>
I am using remote functions now and they are awesome. However, I also have another project where I will be using SvelteKit in SPA only (static) mode with a separate backend written in a different language.
This would be an awesome change and exactly what I am looking for.
Activity
DaniilKubarenko commentedon May 21, 2026
I am using remote functions now and they are awesome. However, I also have another project where I will be using SvelteKit in SPA only (static) mode with a separate backend written in a different language.
This would be an awesome change and exactly what I am looking for.