finished function for phone number validation, but need to test and debug.