In HTML5 you can use <input type='tel'>and<input type='email'>
You can also specify a specific template, for example <input type='tel' pattern='[\+]\d{2}[\(]\d{2}[\)]\d{4}[\-]\d{4}' title='Phone Number (Format: +99(99)9999-9999)'>
Something like pattern='^\+?\d{0,13}'Would give you an extra + and up to 13 digits
source
share