forms – How could I best indicate the required format for a phone number (country + area code)

I can’t remember any one time that someone has gotten this right. They just expect you to know the format to input. This really sucks when someone’s new to a country and not really well versed on how phone numbers in a country look like.

Now, I sort of agree with @MSalters‘ answer, you should use JavaScript to clean up the input. But, I find that forms that aren’t clear about the correct phone number format are mentally jarring. This makes finishing the form even more of a chore than it already is.

So please, don’t disregard the design portion of this input field. The easier your form is to understand the quicker users will finish it. Which, I’m guessing, is what you want, no?

Oh and Alternative 1 is the best option for me. You could also make it so that the suggestion is inside the field (using placeholder attribute)