check the validity of user inputted phone number