update validate to handle docs