More structure validation code