Skip to content

Commit 2b9264e

Browse files
committed
Luhn - add edge case description.
A 0 or 1 length string is not valid, and nor is a string with non-space characters in.
1 parent 1f3fe70 commit 2b9264e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

exercises/luhn/description.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ The task is to write a function that checks if a given string is valid.
77

88
Validating a Number
99
------
10+
Strings of length 1 or less are not valid. Spaces are allowed in the input,
11+
but they should be stripped before checking. All other non-digit characters
12+
are disallowed.
1013

11-
As an example, here is a valid (but fictitious) Canadian Social Insurance
14+
As an example of a valid string, here is a fictitious Canadian Social Insurance
1215
Number.
1316

1417
```

0 commit comments

Comments
 (0)