diff options
| author | Vincent Prouillet | 2016-12-29 13:13:42 +0900 | 
|---|---|---|
| committer | Vincent Prouillet | 2016-12-29 13:16:41 +0900 | 
| commit | a0f2b4c0d4820bfdcc13c7abdfdc7802d9f6d493 (patch) | |
| tree | 75b5bc7b008ac374ac0a437de580d5eda1c67a52 /README.md | |
| parent | ce9ee1ce4ac73ba7989c88c67b16243cbcec2b98 (diff) | |
| download | validator-a0f2b4c0d4820bfdcc13c7abdfdc7802d9f6d493.tar.bz2 | |
Added must_match
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 10 | 
1 files changed, 10 insertions, 0 deletions
| @@ -103,6 +103,16 @@ Examples:  #[validate(range(min = 1.1, max = 10.8))]  ``` +### must_match +Tests whether the 2 fields are equal. `must_match` takes 1 string argument. It will error if the field +mentioned is missing or has a different type than the field the attribute is on. + +Examples: + +```rust +#[validate(must_match = "password2"))] +``` +  ### 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, | 
