-
-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phone-number: Does not properly specifiy test for numbers with length greater than 11 #608
Comments
@wolf99, maybe I got the idea, but I'm not sure. Could you clarify what exactly you want to be changed, preferable with the old and new json fragments? |
Current {
"description": "invalid when 12 digits",
"property": "clean",
"phrase": "321234567890",
"expected": null
}, New {
"description": "invalid when more than 11 digits",
"property": "clean",
"phrase": "321234567890",
"expected": null
}, The old version means that tests will check for implementations to use an input check similar to if (length == 12) {
return ERROR;
} When in fact it should be if (length > 11) {
return ERROR;
} I.E: All lengths greater than 11 are invalid, not just lengths of 12. |
Got it 😃 Nice catch! Would you mind sending a PR for this? Or else I can do the change. |
Added #719 then |
generator: remove premature update to README
The specification for the phone-number exercise says
But the phone-number/canonical-data.json does not specify checking this properly. It checks for length of 11 without leading double 1 to be invalid and for length of 12 to be invalid. It should instead (according to the brief in the readme)check for any number greater than 11 to be invalid.
The text was updated successfully, but these errors were encountered: