validate method
Checks the document against schema.
Returns every problem found instead of throwing, so a migration or an import tool can report all of them at once. Nothing is allocated for a clean document beyond the (empty) issue list.
Implementation
List<VxsValidationIssue> validate(
VxsSchema schema, {
bool allowUnknown = true,
int maxDepth = 8,
}) {
final issues = <VxsValidationIssue>[];
_validateInto(schema, issues, allowUnknown: allowUnknown, depth: maxDepth);
return issues;
}