Comments (10)
Does the problem exist when you downgrade to Qwik v1.1.5? Qwik v1.2.X is currently causing problems in general: QwikDev/qwik#4789
from modular-forms.
Does the problem exist when you downgrade to Qwik v1.1.5? Qwik v1.2.X is currently causing problems in general: BuilderIO/qwik#4789
I have made a modification to the 'index.qwik.mjs' file, specifically to the 'formActionQrl' function. This change involves altering the 'trycatch' block, in such a way that the catch always sets the 'formActionStore' variable, which eliminates the error. I acknowledge that this is not the optimal solution, but it is a provisional measure to avoid delays in the development.
The problem that arises now is that, even though no errors are now presented and the 'formActionStore' variable is properly set with the error messages, etc., the errors are never displayed in the form 'input' and the 'response' is also not set.
I am including an image of the modified function, highlighting the change made.
from modular-forms.
Can you check if the problem still occurs in v0.20.0?
from modular-forms.
Can you check if the problem still occurs in v0.20.0?
Hello, excuse my absence.
In the latest version of QwikJS and ModularForms, the same error continues to occur.
from modular-forms.
I would like to know if there is anything I can do to help solve this problem.
from modular-forms.
Maybe this is the problem: vitejs/vite#9528
Does the problem still occur when you run your Qwik application via pnpm preview
?
from modular-forms.
Maybe this is the problem: vitejs/vite#9528
Does the problem still occur when you run your Qwik application via
pnpm preview
?
Hello, yes, in preview mode the error also occurs.
ws [FormError]
at M2 (file:///Users/caeg.dev/Desktop/duenodirecto/workspace/frontend/server/entry.preview.mjs:294:98288)
at $e (file:///Users/caeg.dev/Desktop/duenodirecto/workspace/frontend/server/entry.preview.mjs:25:5237)
at file:///Users/caeg.dev/Desktop/duenodirecto/workspace/frontend/server/entry.preview.mjs:30:2751
at J (file:///Users/caeg.dev/Desktop/duenodirecto/workspace/frontend/server/entry.preview.mjs:24:1509)
at file:///Users/caeg.dev/Desktop/duenodirecto/workspace/frontend/server/entry.preview.mjs:30:2618
at g (file:///Users/caeg.dev/Desktop/duenodirecto/workspace/frontend/server/entry.preview.mjs:30:2878)
at Object.f2 (file:///Users/caeg.dev/Desktop/duenodirecto/workspace/frontend/server/entry.preview.mjs:294:92884)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.g (file:///Users/caeg.dev/Desktop/duenodirecto/workspace/frontend/server/entry.preview.mjs:30:2855)
at async file:///Users/caeg.dev/Desktop/duenodirecto/workspace/frontend/server/entry.preview.mjs:16:533 {
errors: { mobilePhoneNumber: 'Test error.' }
}
from modular-forms.
For what it's worth, this is my "formAction$" that I use to test the error.
export const useAction = formAction$<Register>(() => {
throw new FormError<Register>({
mobilePhoneNumber: 'Test error.',
});
}, zodForm$(register));
from modular-forms.
I just realized that if instead of doing a "throw" you do a "return" the error disappears and everything seems to work correctly.
I used "throw" because the documentation says so.
export const useAction = formAction$<Register>(() => {
return new FormError<Register>({
mobilePhoneNumber: 'Test error.',
});
}, zodForm$(register));
from modular-forms.
This is strange. Since formAction$
uses try/catch, throw
should work. I will check this as soon as I find time.
from modular-forms.
Related Issues (20)
- Internal issue: Cannot read properties of null (reading 'internal') HOT 4
- SolidJS: Form reset action doesn't preventDefault like submit does. HOT 1
- [Qwik] Form state is reset after action returns an error HOT 1
- [React]: Preact Signals Dependency Update HOT 11
- [SolidJS]: How to handle errors from server? HOT 3
- [Valibot/i18n] Client side validation is not translated HOT 2
- [Bug] Todo - Move First to End - Warning: Cannot update a component (`ForwardRef`) while rendering a different component (`Field`) HOT 3
- [Feature] Ability to configure different validations to run at different times HOT 1
- [Bug]: FormError is invoked only once on Qwik v1.4.5 HOT 5
- valiForm doesn't execute custom validation properly HOT 4
- hello facing types errors HOT 1
- Form submitted when filed has error HOT 2
- [Question] How to implement a controlled component contains multiple fields? HOT 3
- formAction$ code is not executed if Form component has "class" attribute HOT 8
- [Question] Render props pattern HOT 2
- Form action triggers drizzle polyfill issues. HOT 2
- Make the second parameter of the `formAction$` optional HOT 6
- loginForm.submitting not reactive
- Prevent Double Submit HOT 8
- Form action response is optional before form submit 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 modular-forms.