I am using the Knockout Validation plugin and setting an observable as required using the extender:
myObservable.extend({required:true});
Is it possible for me to remove the extender after adding it?
I am using the Knockout Validation plugin and setting an observable as required using the extender:
myObservable.extend({required:true});
Is it possible for me to remove the extender after adding it?
You can remove all the validation relates properties form an observable which were added by the ko validation with calling:
Or if you want to only remove the required validation you can remove it from the
rules
collection:Demo JSFiddle.
But the ko validation has support for conditional validation, so you can specify some condition when the validation should work so maybe this is what you need: