Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Maintaining a mirrored form state for producing an isValid without displaying error messages. #307

Open
ZipBrandon opened this issue Jul 16, 2023 · 0 comments

Comments

@ZipBrandon
Copy link

What is the new or updated feature that you are suggesting?

In regards to #158, my implemented solution was to produce a 1:1 of the form with the form id of ${formId}_VALIDATOR. On all my inputs I have a useControlField/useUpdateControlledField to update the validator form when values change. I use the isValid of the Validator Form to enable/disable a Submit button when values are appropriate for the schema. Mostly this works without a hitch, but occasionally on more complex inputs it gets some weirdness. I believe it would be much easier and less complex if this optional ability was native to remix-validated-form. I don't know if this would be as simple as one-way syncing the form state to a duplicate. I'd be happy to work on a PR based upon any guidance.

Why should this feature be included?

This would enable a lot of different workflows succinctly and provide a great user-experience. Enabling submit buttons when schema is achieved ( my use-case ); displaying new form fields with valid schemas; Auto-submissions based on valid schemas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant