How can machine learning be used in making sure a document has all the required headings and details?


We are trying to build a system that would accept fyp proposal documents and then would validate is there something missing, like a heading or a chart that should be in the document according to the template.

The question is how machine learning can be used to solve this problem. As it seems a simple if else sort of a thing.