I am getting this userFriendlyException when creating the tenant with some numeric , char or space . I tried removing the regex in data annotation but it didn't work.
Tenancy name is a special variable in ASP.NET Boilerplate. In multi tenant configuration tenancy names can be sub-domain. So URL cannot contain invalid characters. Also tenancy names are used in database connection strings when tenant per database option is selected. That's why again tenancy name cannot contain invalid characters for a connection string. Against those rules, you still insist on removing that rule. You can! Actually there must be two regex expressions both in DTO and Entity itself. Try to remove those and see the result.