Comments (5)
The intent of posted is to be true as soon as the form has been posted.
from sveltekit-superforms.
I'm not sure I understand your response.
What is the definition of posted?
Surely the sequence is submitting -> posted?
How can the form be posted if it was never submitted?
The way it has always worked is that unless the form is posted to the server, posted is not set to true.
If the data is invalid with client-side validation, then there is no submission and therefore posted is not true.
If the cancel function is called during onUpdate, it is also not set to true.
At least when the SPA mode is set to true.
This change completely breaks the functionality that I have been depending on and has been that way since I started using the library in 1.x.
If the data is not posted to the server because of errors, then it is not posted, correct?
If this was intended to change or be "fixed", why is it not noted in the release notes for 2.8.0?
And if so, what store can I use to determine if the form has been submitted succesfully to the server?
from sveltekit-superforms.
You expect too much, it's an open source project. Please contribute some falling tests if you've found a regression.
from sveltekit-superforms.
For what it's worth this is currently my favourite library, and I really appreciate all the work and effort that is going in it, and to maintain it.
It seems like you think I am being unreasonable. I am reporting what I believe is a bug.
I felt that your initial response was quite dismissive, and made it seem like it wasn't a bug or was by design, so I provided more information and seek clarification.
What expectations do you think I have that are too much?
I am willing to conceded that the behaviour I am depending on is not specifically intended in SPA mode.
I am probably in the minority when it comes to the way that I use sveltekit & superforms.
But there doesn't seem to be enough information on what the posted store is intended for use for and how it behaves in certain situations.
I have spent a lot of time investigating every bug I encounter in order to make sure it is a bug, even tracking down the exact version change that it happened in. And testing things out in the REPLs (which are often quite buggy) to make sure it's not something weird going on in my machine.
I'd be happy to contribute if it helps improve the library, although my time is quite limited at the moment.
If you can point me in the right direction for writing some tests, I'll have a look when I have a chance.
from sveltekit-superforms.
You seem to expect no regressions and that the documentation and changelog should be fully updated, which is unrealistic for an open source project with a single maintainer and a few very kind sponsors.
You say your time is quite limited, well, it's the same for others. But that's how it is with OSS, you pay with your time.
superForm and superValidate are the two functions that should be used for testing the posted store, here they are: https://github.com/ciscoheat/sveltekit-superforms/tree/main/src/tests
from sveltekit-superforms.
Related Issues (20)
- Two forms in same page. When a submit the form 2, data returned in form 1 is cleared. HOT 1
- [Question]What is the good practice of returning `fail` caused by things other than form validation errors? HOT 2
- Provide reducers/reviviers for devalue in superForm/superValidate functions HOT 1
- After submit the validation data is empty HOT 5
- Proxy object in nested array HOT 6
- Superforms is not compatible with Svelte 5 (preview) in rune mode HOT 2
- Error with use:enhance when using on Safari IOS 13.6 HOT 3
- simple-runtype HOT 1
- accept union type in generic component HOT 6
- Issue with nested data custom validation. An error is thrown when the path is not explicitly passed. HOT 4
- Support new Valibot piping? HOT 16
- SuperDebug CSS is included in SSR-only production build HOT 5
- how to implement progress bar for file uploading
- numberProxy, stringProxy don't restore with snapshot restore
- Unexpected bug during schema validation (jsonschema schemasafe adapter) HOT 1
- Submitting without tainting a field doesn't show errors if cancel is called HOT 1
- Use `customValidity` with `_errors` HOT 1
- typia support HOT 3
- Cannot use `z.array()` as first-level schema HOT 1
- Types have separate declarations of a private property '_cached'. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sveltekit-superforms.