Validate database name, on the server and on the client