Merge pull request #220 from olanod/patch-1

Update input_value_validators.md
This commit is contained in:
Sunli 2020-07-30 09:27:37 +08:00 committed by GitHub
commit 6afee1730c

View File

@ -50,7 +50,7 @@ Here is an example of a custom validator:
```rust
struct MustBeZero {}
impl InputValueValidator for InputValueValidator {
impl InputValueValidator for MustBeZero {
fn is_valid(&self, value: &Value) -> Option<String> {
if let Value::Int(n) = value {
if n.as_i64().unwrap() != 0 {