Skip to content

Commit 261b2e2

Browse files
committed
minor edit to doc
1 parent cf0d3a5 commit 261b2e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,13 +1269,13 @@ And functions work as well ! You can imagine how you could evolve a nice set of
12691269
* match date == { month: '#? isValidMonth(_)' }
12701270
```
12711271

1272-
Especially since strings can be easily coerced to numbers (and vice-versa) in Javascript, you can combine built-in validators with the self-valildation 'predicate' form as follows:
1272+
Especially since strings can be easily coerced to numbers (and vice-versa) in Javascript, you can combine built-in validators with the self-valildation 'predicate' form like this: `'#number? _ > 0'`
12731273
```cucumber
12741274
# given this invalid input (string instead of number)
12751275
* def date = { month: '3' }
12761276
# this will pass
12771277
* match date == { month: '#? _ > 0' }
1278-
# but this won't
1278+
# but this 'combined form' will fail, which is what we want
12791279
# * match date == { month: '#number? _ > 0' }
12801280
12811281
```

0 commit comments

Comments
 (0)