-
Notifications
You must be signed in to change notification settings - Fork 379
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
Updating a validatedObservable will not reset initial validation result #209
Comments
Is there a known workaround for this issue? |
Hi, I think this project is a bit lost in what is really important. But whatever, I fixed this issue, but I'm not a contributor. In the knockout.validation.js file just change:
into:
Hopefully it will be added in the newest release. |
Hi @DenEddie, thanks for the contribution. There's no need to be a "contributor" though - you can fork the repo, make the change in your local branch and then raise a pull request. Ideally we would want some unit tests as well though |
Hi @stevegreatrex, I would love to contribute this partials code, but the problem is I didn't figure out how the current structure in code is done. I still use the 1 file library, but I see that they are being split up in multiple files. Let me know where you most like to see this and what sort of unit test you like and I contribute this :) |
Don't think that it's a good idea to hold a whole object inside observable. A better way is to create one view model inside another and then only updates its values using something like |
This will not work because it overwrites the |
I've encountered a problem regarding the validatedObservable.
When first set, validation occurs correctly, however after being set to a new observable, the validation result stays the same.
You can use this fiddle to reproduce the issue: http://jsfiddle.net/anzeo/56nLM/
Steps:
(note: the scenario could be inversed by directly clicking on 'update contact' and then filling in a value and clicking 'add contact'
The text was updated successfully, but these errors were encountered: