Move toolbar validation into the document class