How to remove validation text warning

Hi, I have a conditional textfield, when I click a button it validates only if the textfield isn't empty.

What I'm trying to achieve is that when user submit text it will validate but when you delete that text there will be no validation - The Problem is the red warning message, it stays even if there's no validation. Anyone knows a way to "remove" that text when the textfield is empty ?

4
7 replies