You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ko.bindingHandlers.yourBindingName = {init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {// This will be called when the binding is first applied to an element// Set up any initial state, event handlers, etc. here},update: function(element, valueAccessor, allBindings, viewModel, bindingContext) {// This will be called once when the binding is first applied to an element,// and again whenever any observables/computeds that are accessed change// Update the DOM element based on the supplied values here.}};
... then register the custom binding with knockout validation:
ko.validation.makeBindingHandlerValidatable('yourBindingName');