[wip] Generic format validator

Refactors validate logic into applicator functions