validate method

  1. @override
bool validate(
  1. String selector,
  2. String reference
)
override

Validate a value in the document at the specified path selector.

reference is the information used to validate, such as a JSON schema. It depends on the implementation of the document.

Implementation

@override
bool validate(String selector, String reference) {
  final jsonSchema = JsonSchema.create(reference);
  return jsonSchema.validate(get(selector)).isValid;
}