The following regular expression will validate phone numbers in all well known formats, such as:
555-12-34
555 12 34
555 1234
555 12-34
5551234
(012) 555-12-34
(012) 555 1234
+1 (012) 555-12-34
+1 (012) 5551234
…and many other similar formats.
/^(\+\d)*\s*(\(\d{3}\)\s*)*\d{3}(-{0,1}|\s{0,1})\d{2}(-{0,1}|\s{0,1})\d{2}$/