aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/README.md b/README.md
index e99a54f..37946ee 100644
--- a/README.md
+++ b/README.md
@@ -112,6 +112,16 @@ Examples:
#[validate(must_match = "password2"))]
```
+### contains
+Tests whether the string contains the substring given or if a key is present in a hashmap. `contains` takes
+1 string argument.
+
+Examples:
+
+```rust
+#[validate(contains = "gmail"))]
+```
+
### custom
Calls one of your function to do a custom validation.
The field will be given as parameter and it should return a `Option<String>` representing the error code,