nimafire Posted January 12, 2020 Share Posted January 12, 2020 hey how can we prevent customer from registering who register with local language character only allow English character this doesnt work now : pattern="[a-zA-Z ]+" oninvalid="this.setCustomValidity('fill form in english')" oninput="setCustomValidity('')" {if $loggedin} readonly="readonly"{/if} autofocus 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 13, 2020 Share Posted January 13, 2020 On 12/01/2020 at 14:20, nimafire said: how can we prevent customer from registering who register with local language character have you unticked the "Allow IDN Domains" in setup -> general settings -> domains ? https://docs.whmcs.com/Domains_Tab#Allow_IDN_Domains Quote Ticking this option allows domains containing any character to be used. When unticked WHMCS will only allow clients to use a-z and 0-9 in domains. 0 Quote Link to comment Share on other sites More sharing options...
nimafire Posted January 14, 2020 Author Share Posted January 14, 2020 i mean sign up, not registering domain. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted January 14, 2020 Share Posted January 14, 2020 (edited) IMO the best approach is use transliteration. This way customers can freely register using any alphabet and transliteration will convert them to latin charachers like follows: 川島 永嗣 becomes Eiji Kawashima Mandžukić becomes Mandzukic 颜骏凌 becomes Yan Junling You should transliterate on ClientAdd, ClientEdit, ContactAdd and ContactEdit. Edited January 14, 2020 by Kian 1 Quote Link to comment Share on other sites More sharing options...
nimafire Posted January 14, 2020 Author Share Posted January 14, 2020 ive use this in input : onkeypress="return /[a-z]/i.test(event.key)" title="{$LANG.fillinenglish}" but im looking for better way , this will prevent customer from enter none english character in input 0 Quote Link to comment Share on other sites More sharing options...
imaticon Posted January 14, 2020 Share Posted January 14, 2020 @Kian has provided to you the best possible solution currently available and it is indeed the correct way to go 👍 0 Quote Link to comment Share on other sites More sharing options...
Tengri Posted May 31 Share Posted May 31 Hello! I want to reburn this topic. How can we prevent non-English characters in registration form? Customer can use only ASCII standard. 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.