Phone number exercise missing test case

Hi, I just found that in Julia and C++ (possibly other tracks) the test case against invalid characters in the input string is incomplete. There is no example of an invalid string which contains a valid phone number, i.e. something like β€œ223apple.456.7890” (unless this is actually meant to be correct?). Hence, a solution which removes all non-digit characters and tests only the resulting string (of digits) for correctness will pass all tests.

Are you describing something that is present in the problem specs and which has not yet been synced to the track? Or something that is not present in the problem specs and which you are suggesting is worth adding?

1 Like

Well, my original thought was that it would be worth adding an example to the problem spec that contains a valid number plus invalid input, since the test cases only seem to cover invalid numbers plus a few letters or punctuation (e.g. β€œ523-abc-7890” , β€œ523-@:!-7890”).
But now, I no longer think so. After all, the problem is about cleaning up and validating the numbers, no matter how they’re formatted. (And from this point of view there would be no such thing as a β€˜valid number plus invalid input’)