Search code examples
javascriptvalidationknockout.jsknockout-validation

How to remove the validation rules [extenders] from observable in Knockout Validation


How to remove extender from an existing observable?

I tried the above link & can make the observable NOT validatable. But if the check the observable with ko.validation.utils.isValidatable() function, it gives me TRUE [it says observable is validatable even after making that as NOT validatable].

Because making validatable:true leaves the isValid, isModified, isValidating observables & error variable on the observable property.

Please help me to remove the validation completely form the observable property.


Solution

  • you can use the onlyIf param if you want to toggle the validation. completly remove validation is not built in, check my question here for a way

    Move validation from observable to computed