Form Generation & Validation #1294
Unanswered
Petri-Oosthuizen
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Form management between the frontend (particularly SPA) and backend is a persistent challenge. Ideally, forms would be simple and static, but in reality, they evolve over time and are often handled by multiple developers. While UI tests should cover all backend scenarios, they frequently fall short. For small teams, keeping forms and their validation in sync is particularly difficult, leading to redundant work and inconsistencies. One possible solution is synchronizing form generation and validation across both frontend and backend to establish a single source of truth.
Some key challenges in an end-to-end flow include dynamically building and displaying forms on the client side, ensuring client-side validation provides immediate feedback without compromising performance, and properly mapping form data to server requests. Server-side validation often mirrors client-side logic to maintain data integrity and security. Keeping frontend and backend validation in sync as forms evolve is another challenge. Additionally, complex validation scenarios—such as async validators, and dynamically modifying inputs and validation—add further complexity.
How does TanStack/Form fit into this space—does it align with its intended scope? Are there existing solutions or best practices that small teams can adopt for scalable form management in conjunction with TanStack/Form? Finally, would a form builder be on the table?
Looking forward to hearing insights on how others tackle these issues!
Beta Was this translation helpful? Give feedback.
All reactions