re-write of struct validator, and new validation checks added