edited phone number function

Added a lot of logic to the phone number function to check that certain
characters are indeed "-" and that all entered text is either a number
or and dash.