Comments (10)
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
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)
- Qwik: Latest qwik release breaks types HOT 14
- Enhance FieldStore to Return Multiple Errors per Field HOT 2
- Phone Number Input HOT 1
- Allow setting initial form values of a mounted component HOT 2
- Preact: What is the best method to pull values of fields in the form for using in computed() HOT 4
- [Question] Is it possible to have optional fields? HOT 7
- Import error in formAction for qwik HOT 1
- Checkbox works improperly when use modular forms with kobalte HOT 7
- [Question] Is it possible to have custom input without ref? HOT 5
- When useFormStore is in a seperate file, it fails HOT 1
- Select component with number types HOT 3
- Using modular form Fields inside solidjs Dynamic component HOT 1
- Qwik: Vite is trying to externalize packages used in formAction$ HOT 3
- `requestSubmit` is not a function on Safari < 16 HOT 3
- Does this library support React Native? HOT 1
- 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
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.