add validation logic to templated datatables (wip)