Fix validators bug
This commit is contained in:
parent
6496509c77
commit
76035443ac
|
@ -92,7 +92,11 @@ where
|
|||
B: InputValueValidator,
|
||||
{
|
||||
fn is_valid(&self, value: &Value) -> Option<String> {
|
||||
self.0.is_valid(value).or_else(|| self.1.is_valid(value))
|
||||
if let Some(_) = self.0.is_valid(value) {
|
||||
self.1.is_valid(value)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user