Knockout-Validation
Knockout-Validation copied to clipboard
makeBindingHandlerValidatable to accept property name
ko.validation.makeBindingHandlerValidatable only takes a single argument, which does not work for widget extension libraries which provided an argument list as properties of an object.
as 1 of hundreds of simple examples, the syntax for the knockout-jqueryUI project (on github) inline datepicker is:
<div data-bind="datepicker: { value: value2 }"></div>
A very simple fix (pull request associated with this enhancement request) can remedy this with the function call: ko.validation.makeBindingHandlerValidatable('datepicker', 'value') without breaking the existing functionality.
Thanks @mcshaz Any chance of adding some tests to #563 ?