remove hand-rolled validate function