Knockout-Contrib / Knockout-Contrib/Knockout-Validation

Allow alternative means of hiding/showing error message.

Open
#432 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1k
Forks
366
PR merge metrics
No merged PRs in 30d

Description

Hi.

Currently, when using either default validation messages or explict (in-template) ones,
hiding and showing of them is done via `style="display: none;"` attribute:

``` html


Name



```

or

``` html


Name



```

which makes styling and especially animating the error message a pain.

Perhaps configuration option **instead** :

``` javascript
errorMessageVisibleClass: 'is-hidden'
```

so that, when **it is supposed to be hidden**, it would look like this:

``` html


Name



```

would allow more flexibility?

EDIT: cleaned up hurried explanation.

Contributor guide

Open the contributing guide

Research direction

Start by locating the validation-message rendering and configuration code for both default validation messages and the validationMessage binding. Check how hidden messages currently receive the inline display style and whether existing tests cover that behavior. Done means an option such as errorMessageVisibleClass can control the hidden state without relying on an inline style, with coverage for both message forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
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.