aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorVincent Prouillet2019-05-01 20:45:08 +0200
committerGitHub2019-05-01 20:45:08 +0200
commit0a8e454014edf415513a76fc060482503b9814fb (patch)
tree3e4d3d37c20aea45d8e74271863a6979c092100e /README.md
parentf33a34c6ed2d76ce6569a6bc40517ce9a69271d3 (diff)
parent6e8effdaa2b47f4056a00d301a9e7a5a1a2fd8dc (diff)
downloadvalidator-0a8e454014edf415513a76fc060482503b9814fb.tar.bz2
Merge pull request #71 from cazgp/feature/range-min-or-max
Issue #69: Change `range` to require only one arg
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index 145c74c..09d2982 100644
--- a/README.md
+++ b/README.md
@@ -179,14 +179,16 @@ Examples:
```
### range
-Tests whether a number is in the given range. `range` takes 2 number arguments: `min` and `max`.
+Tests whether a number is in the given range. `range` takes between 1 and 2 number arguments: `min` and `max`.
Examples:
```rust
#[validate(range(min = "1", max = "10"))]
+#[validate(range(min = "1"))]
#[validate(range(min = "1", max = "10.8"))]
#[validate(range(min = "1.1", max = "10.8"))]
+#[validate(range(max = "10.8"))]
```
### must_match