diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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, |
