class
UCL::Validator
- UCL::Validator
- Reference
- Object
Overview
Validates a UCL/JSON document against a UCL/JSON schema using libucl's
ucl_object_validate. Backs UCL.validate and UCL.valid?.
Defined in:
ucl/validator.crClass Method Summary
-
.validate(schema : String, string : String, flags = UCL::Parser::DEFAULT_FLAGS) : Bool
Parses both schema and string (with flags) and validates the data against the schema.
Class Method Detail
Parses both schema and string (with flags) and validates the data against the schema.
Returns true when valid, otherwise raises UCL::Error::SchemaError with
the message reported by libucl.