Tenant shortname validation

This pull request has also been made to the official repo, but I wanted to send it to you as well since this branch is what we are currently using.