I want to show an error message when a user moves to a different input element without filling in a specific input. (like in image below, “Your phone number format is invalid” message displays when I move on to another input element)
Error message can’t be displayed when a user does not select any form.
So how can I get to know which element is focused?
On the input component, you have the event on blur, which triggers when the user unfocuses the input.
When it’s happening, you can then check the content of the input