Change error message for "minItems".

The error message for "minItems" was the same as "maxItems". Change it to use the same verbiage as "minProperties".
This commit is contained in:
Ryan Ham 2017-11-20 13:01:32 -05:00 committed by GitHub
parent 81c8bc2190
commit fa7f7ebcff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -460,7 +460,7 @@ void json_validator::validate_array(const json &instance, const json &schema, co
const auto &minItems = schema.find("minItems");
if (minItems != schema.end())
if (instance.size() < minItems.value().get<size_t>())
throw std::out_of_range(name + " has too many items.");
throw std::out_of_range(name + " has too few items.");
// uniqueItems
const auto &uniqueItems = schema.find("uniqueItems");