Hi There
We are currently working on a razor application using knockout 2.1. We have started using the knockout validation library.
The issue is that we have a view with an Add button. Clicking the Add button results in a popup with a couple of Select and date picker controls. Problem is that the ko validations are being fired on the initial load of the popup. What are we missing here - maybe on the initial load of the view, knockout thinks the view model has changed and therefore fires the validations? How can we determine which property on the view model has changed and is there a way to stop that explicitly?
We are trying "this.<>.isModified(false)" but no luck. This isnt working too:
ko.validation.configure({
registerExtenders: true,
messagesOnModified: true,
insertMessages: false,
parseInputAttributes: true,
messageTemplate: null,
grouping: {
deep: true
}
});
Any help will be appreciated guys
Thanks
Jatin
Hi There
We are currently working on a razor application using knockout 2.1. We have started using the knockout validation library.
The issue is that we have a view with an Add button. Clicking the Add button results in a popup with a couple of Select and date picker controls. Problem is that the ko validations are being fired on the initial load of the popup. What are we missing here - maybe on the initial load of the view, knockout thinks the view model has changed and therefore fires the validations? How can we determine which property on the view model has changed and is there a way to stop that explicitly?
We are trying "this.<>.isModified(false)" but no luck. This isnt working too:
ko.validation.configure({
registerExtenders: true,
messagesOnModified: true,
insertMessages: false,
parseInputAttributes: true,
messageTemplate: null,
grouping: {
deep: true
}
});
Any help will be appreciated guys
Thanks
Jatin