Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Enable knockout 3.4 deferred updates.
ko.options.deferUpdates = true;
// Setup validation policy.
ko.validation.init({
errorMessageClass: 'val-msg',
decorateInputElement: true,
errorElementClass: 'invalid',
errorsAsTitle: false,
messagesOnModified: true,
writeInputAttributes: true
});
// Register custom extenders, bindings, components and validation rules.
registerExtenders(ko);
registerBindings(ko);
registerValidationRules(ko);
registerComponents(ko, injectedServices);
}