Revising struct validation code.