Knockout-Contrib / Knockout-Contrib/Knockout-Validation
“onlyIf” is frozen on start
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 366
- PR merge metrics
- No merged PRs in 30d
Description
I have the "[onlyIf](https://github.com/Knockout-Contrib/Knockout-Validation/wiki/Conditional-Validation-with-onlyIf-parameter)" parameter frozen on start in my KnockoutJS validation logic with collections.
```
.extend({required: {onlyIf: function () {
// ... some Changes Tracking code ...
```
[**jsFiddle** - frozen onlyIf parameter](http://jsfiddle.net/it3xl/5zs75yey/)
Validation doesn't work properly until I manually do resetting for values in all fields with **"{required: {onlyIf: function ()"** validation rule.
Is this a bug or I miss something?
---
Taken from [my stackoverflow post](http://stackoverflow.com/questions/29835255/knockout-validation-onlyif-is-frozen-on-start).
Contributor guide
Research direction
Start with the linked jsFiddle and the Conditional Validation with onlyIf wiki page to reproduce the collection scenario. Compare the frozen behavior with the expected onlyIf validation behavior and determine whether the issue is a library bug or usage misunderstanding; no repository file or test is identified in the report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100