Knockout-Contrib / Knockout-Contrib/Knockout-Validation

errorMessageClass is not getting applied when using insertMessage is true on select lists

Open
#640 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.