However, you still have to worry about malformations, such as phone numbers that aren't 7 or 10 digits.
So every database has numbers only within a single country? Not like any database I've ever used. I even thought about not filtering out leading plusses, but didn't do so, because I think this was homework anyway - and there should still be a challenge.
As for 7 or 10 digits, I had no idea about how other countries have their telephone numbers, and think I should not guess.
The fix: check length.
U28geW91IGNhbiBhbGwgcm90MTMgY
W5kIHBhY2soKS4gQnV0IGRvIHlvdS
ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
geW91IHNlZSBpdD8gIC0tIEp1ZXJk