I just signed up for a new online service, and when I typed my email address, from the moment I started typing until I had typed the second letter after of the TLD, next to the input field there was an aggressive red error message - "This is not a valid email address".
This message was factually correct. At the same time, I received an error message while I had not actually made an error: I needed to input all those letters etc. in order to get to a valid email address.
I like the idea of validating while still in the field, since this is a pattern that works independently of where the field is in a form. Validating on switching to the next form field cannot work if it's the last in the form - in that case you can only do the validate + error message after hitting submit or a like action.
What is a better way of handling such validity checking while the focus is still in the field/during input? E.g. do you start when the user stops typing - immediately or after a short timeout?