Jump to content
nimafire

prevent register with none English letter

Recommended Posts

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 $loggedinreadonly="readonly"{/if} autofocus

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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 by Kian

Share this post


Link to post
Share on other sites

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 

Share this post


Link to post
Share on other sites

@Kian has provided to you the best possible solution currently available and it is indeed the correct way to go 👍

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated