Open Cloud-Awesome opened 3 years ago
Perhaps the best way is to make the Validate function, part of the IDocumentPart interface, and just loop through those?
Would need to be recursive though, for grandchildren... Or, given we have a distinctive list of which child elements always have children, the grandchild validation could be part of the child validators?
Finally, probably need to review the validate functions themselves, as they currently throw the exception, which wouldn't work when we want a full list of errors. Nice wee bit of refactoring required there ;)
Before deleting and creating a new file, validate the output