Knockout-Contrib / Knockout-Contrib/Knockout-Validation
feature request: custom method to display error message
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 366
- PR merge metrics
- No merged PRs in 30d
Description
Hello
I like ko and ko.validation plugin. Good work, guys. Thank you.
I'm trying to use ko and validation in my project now.
Problem which I faced is next: I would like to have custom show-error function to display errors in my own way. Particularly, I would like to show tooltip (like jquery-ui-tooltip or tipsy) to display errors.
I think kv could use something like displayErrors: function(element, observable, errors) {...} in configuration to allow custom message rendering. And also hideErrors: function(element, observable) {...} to allow hide error messages. And kv could trigger this functions when it need to display errors. And current implementation would became the default implementation, so, everyone can easy replace default implementation. I think it will give great flexibility in message displaying.
I'm thinking now about implementing this.
Please, let me know what do you think? Will this be good feature for kv and will you accept pull request (what is your politics in this part)?
Contributor guide
Research direction
No files or tests are named. Start by locating the current error-message rendering and configuration entry points, then review the existing display and hide behavior. Done means configurable displayErrors and hideErrors hooks support custom rendering while preserving the current implementation as the default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100