mirror of
https://github.com/tristanpenman/valijson.git
synced 2024-12-12 10:13:51 +01:00
Make subschema constraint validation clearer
This commit is contained in:
parent
0530af0709
commit
0b7efb3763
@ -120,7 +120,12 @@ public:
|
||||
{
|
||||
bool allTrue = true;
|
||||
for (auto &&constraint : m_constraints) {
|
||||
allTrue = applyFunction(*constraint) && allTrue;
|
||||
// Even if an application fails, we want to continue checking the
|
||||
// schema. In that case we set allTrue to false, and then fall
|
||||
// through to the next constraint
|
||||
if (!applyFunction(*constraint)) {
|
||||
allTrue = false;
|
||||
}
|
||||
}
|
||||
|
||||
return allTrue;
|
||||
|
Loading…
Reference in New Issue
Block a user