I tried using a validator with a smart input, when I set a required rule and render the component with empty input, it is correctly shows an error state, however if I manually enter some text, and then reset the field back to empty value with a button click, the validator does not trigger, and the field still shows as valid despite being empty. I guess it is connected to the fact that the validator is triggered by events, so how could I trigger the validation to show the validation state correctly?
I tried programatically firing the event:
<div>
<div> const element = document.querySelector(#field
);</div>
<div> if (element) {</div>
<div> const event = new Event(‘keyup’, {</div>
<div> bubbles: true</div>
<div> });</div>
<div> element.dispatchEvent(event);</div>
<div> }</div>
</div>
<div>That did not trigger validation either.</div>