Search code examples
knockout.jsknockout-validation

Difference between ko.validation.configure vs ko.validation.init


Both are used to apply the knockout validation configurations on viewmodel. What is the different between these two statements?

Thanks


Solution

  • I looks like configure is there for backwards compatibility, and just calls init.

    From the validation source (https://github.com/Knockout-Contrib/Knockout-Validation/blob/master/Src/api.js#L120):

            // backwards compatability
            configure: function (options) { ko.validation.init(options); },