Knockout-Contrib / Knockout-Contrib/Knockout-Validation
errorMessageClass is not getting applied when using insertMessage is true on select lists
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 366
- PR merge metrics
- No merged PRs in 30d
Description
If you want to change the errorMessageClass for a knockout bound select that dynamically loads its options, the auto generated span uses the default "validationMessage" instead of the correct class. Also if you try to use your own span, it will create the auto generated one in addition to the existing span.
One more thing, if you try to set the options in the data-bind="validationOptions" they are ignored because the node[domDataKey] always returns undefined for the select element
Contributor guide
Research direction
Start by tracing the select-list validation path for dynamically loaded Knockout options, including how validationOptions and domDataKey are read. Reproduce the issue with insertMessage enabled and verify that errorMessageClass is applied, custom spans are not duplicated, and validationOptions are honored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100