Knockout-Contrib / Knockout-Contrib/Knockout-Validation

makeBindingHandlerValidatable to accept property name

Open
#562 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
1k
Forks
366
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the makeBindingHandlerValidatable function and inspect how its existing single-argument behavior is used. Done means the function accepts a binding name and property name for object-valued bindings such as datepicker: { value: value2 }, without breaking existing calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.