Xexus Posted August 13, 2017 Share Posted August 13, 2017 I've discovered that sometimes a two letter domain shows as available, even though we know that the SLD has to be at least 3 characters. My solution was to add minlength="3" to the input (id="inputDomain") in my adddomain.tpl. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 13, 2017 Share Posted August 13, 2017 I've discovered that sometimes a two letter domain shows as available, even though we know that the SLD has to be at least 3 characters. there are many gTLDs, and ccTLDs, that would allow 2 letter domains... .uk would be one, .me would be another and many Donuts TLDs would to. My solution was to add minlength="3" to the input (id="inputDomain") in my adddomain.tpl. so i'd be unable to go to your site and register 9p.me.uk - even though that's a perfectly valid unregistered option ?? (ignoring that you don't even offer .uk domains, you get my point?!) the official way to do this in WHMCS is in the configuration file where you can set different minimum/maximum length values for each TLD. https://docs.whmcs.com/Domains_Configuration#Customising_Domain_Name_Length_Restrictions though whether it works depends on your version of WHMCS... I can well recall it failing with some versions of 5 & 6, but working with others... from a previous thread, i'm pretty sure it now works with v7. btw - does Edge even support minlength? I can bypass it easily by using that browser, though Firefox & Chrome will show your incorrect min length requirement. and in case you're wondering, 9p.academy is a valid unregistered domain too - though probably premium priced (but that's another story). 0 Quote Link to comment Share on other sites More sharing options...
Xexus Posted August 14, 2017 Author Share Posted August 14, 2017 Thanks for the link. I was looking for just such a thing. It seems like a lot of work though, having to list each TLD individually.I wonder if something like $DomainMinLengthRestrictions[".*"] = 3; would work? The minlength works in my linux based firefox and chrome, but after reconsidering it, I decided to use reg exp with the pattern tag instead. The example I was working against was nh.email, which is taken, but showed as available. I figure 3 characters is safe as no one is going to find a two letter domain available anyway. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 14, 2017 Share Posted August 14, 2017 Thanks for the link. I was looking for just such a thing. It seems like a lot of work though, having to list each TLD individually.I wonder if something like $DomainMinLengthRestrictions[".*"] = 3; would work? like a lot of core WHMCS domain features, they were written when there were only a few TLDs available, so the method chosen made "some" sense... but now that there are thousands of TLDs available, nearly all of which can be ordered through WHMCS, those methods are unwieldy to say the least. I don't think wildcards would work. The minlength works in my linux based firefox and chrome, but after reconsidering it, I decided to use reg exp with the pattern tag instead. The example I was working against was nh.email, which is taken, but showed as available. I figure 3 characters is safe as no one is going to find a two letter domain available anyway. you mean apart from 9p.me.uk and 9p.academy...? it's kind of ironic that WHMCS would prevent you from searching for 9p.me.uk even though it's valid and available.... interestingly, just tried to reset the min length for .me.uk to 2 in the configuration file and it still insists that the minimum length should be 3... perhaps the function is as flaky as ever and doesn't seem to work on v7.2.3... yet going by a previous reply by me, must have worked on the v7.2beta. sometimes you just have to laugh as WHMCS... if only to keep hold of your sanity whilst using it. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.