diff options
| author | Vincent Prouillet | 2017-01-18 00:29:23 +0900 | 
|---|---|---|
| committer | Vincent Prouillet | 2017-01-18 00:30:44 +0900 | 
| commit | 32ada012eb1de7da60d979b65844d008fc75b458 (patch) | |
| tree | 6fa876cff0dc3689a4421f2a5d151be2096173be /README.md | |
| parent | d8298ba2c96692cf4fb954393afb9fe10cb31b4c (diff) | |
| download | validator-32ada012eb1de7da60d979b65844d008fc75b458.tar.bz2 | |
Add contains validator
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, | 
