Like it’s actively frustrating to focus a field like a phone number entry and already the field is red and says something like “must be a valid phone number”. Yes I know that! I’m trying to enter one! Stop drawing my attention to useless information!
Displaying some kind of error if I focus away and the input is invalid or blank is marginally better (and I can see how in some cases might be a better choice, even), and displaying an error “on submit” (for some definition of submit) seems utterly reasonable. But before the user even has a chance to enter a valid value is just a good way to piss them off.