-
Notifications
You must be signed in to change notification settings - Fork 433
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
Performing a reset without running the validation #417
Comments
@lennardschutter what version of formsy-react are you on? If things were working correctly before and suddenly changed it was probably due to the 0.19.1 release. See the discussion here 57f97cb In short, you can use |
@aesopwolf it seems to happen on all versions for me. I think it might have to do with a custom validation rule I added for isRequired (I don't want to use the HTML5 implementation for this to keep the form and UX consistent).
|
Might be worth using 0.19.1 then and conditionally showing your errors by using The validations will run but you will only display the errors if the form has been submitted. Or I might be reading your issue wrong. What do you mean by "from a partial save"? |
So if I understand correctly I At the moment I am working around the issue by not setting the model via Just to give you a little more context. The form I built is a confirmation form that confirms some final details before handing out some information. In this form some information might already be filled out in another part of the application but others fields might not have. |
Never mind my comment about 0.19.1, we actually just issued a rollback of that version. (long story). Back to your issue... Would you mind copy/pasting your Formsy.Form component and also your custom form element (just one should be enough)? It will help me a lot to debug this. |
I just created a PR #420 for this. Might be a better way to set the initial form data. I am actually using formsy-react-components. |
Hmm, that looks like it will work. Mind giving me a little bit to think about it? I might want to wait for the 1.0.0 release to expose the new method. |
That is alright. As I said I have got a workaround in my app for now. I will wait until we can implement something like this before I migrate my other forms to Formsy. |
Hi guys, how is it going with this bug? I have |
btw. this workaround stops work when you set |
I am loading data fetched from the server on a larger form and I would like to pass this in to my Formsy.
To do this I use
form.reset(data)
to pass the data in to the form. Now the issue is that this automatically runs the validation which looks bad for the customer since half the form could be red already (from a partial save).Is there a way we can pass new (or initial) data to Formsy without running the validation?
The text was updated successfully, but these errors were encountered: