I think you should use regex because "*.mydomain.tld" sould be accept "sub.mydomain.tld", "sub.sub.mydomain.tld" or "sub.sub.sub.mydomain.tld"