diff --git a/src/json-validator.cpp b/src/json-validator.cpp index f497aea..47b16f5 100644 --- a/src/json-validator.cpp +++ b/src/json-validator.cpp @@ -672,9 +672,8 @@ public: attr = sch.find("format"); if (attr != sch.end()) { - if (root_->format_check() == nullptr) { + if (root_->format_check() == nullptr) throw std::invalid_argument{"a format checker was not provided but a format keyword for this string is present: " + format_.second}; - } format_ = {true, attr.value()}; sch.erase(attr);