More validation code.