Fix validation code

Validation code had not kept up with changes in other files. This commit
gets it working again.