enforce maxlength on DIDs