[Validation series] hide validator in page when field becomes valid again

If I hit the validation trigger button, several validators are displayed for the invalid fields (let’s say empty textboxes and unselected dropdowns, all with [Required] on their bound properties). If the user makes any of these fields no longer empty/unselected, I would like the corresponding validators to hide automatically (without hitting the button again).

Is there an easy existing way to centrally achieve this for all validators on page, or must I write custom event handlers and bind them explicitly to all the fields?

Any idea?

PS: I’m aware of this: https://stackoverflow.com/questions/52506187/dotvvm-validation-errors-clear

I’m not aware of any easy way to automatically clear the errors after a change. If you’d be happy applying this globally to all properties, then it shouldn’t be a problem to write a script for it. I could help you with it when I get more time for this, this is the DotVVM API you’d need:

let oldState = dotvvm.state
dotvvm.events.newState.subscribe(newState => {
    // ... deep comparison of newState/oldState
    // clear changed properties using dotvvm.validation.removeErrors("/Validation/Path")
    oldState = newState
})