Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6210337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:08:32+00:00 2026-05-24T06:08:32+00:00

I want to allow users to create a username using only alphanumeric characters but

  • 0

I want to allow users to create a username using only alphanumeric characters but where the alpha characters can be any of the characters in the user’s native language. It must be possible to restrict the input to only those characters that are part of the alphabet of the native language or if there is no alphabet in a language (like Chinese), then limited to those characters that would normally be considered non-symbolic (symbolic characters being a question mark, colon, etc).

Using inputType seems to pose a problem because setting it to “text” actually allows the keyboard to display symbols as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:08:33+00:00Added an answer on May 24, 2026 at 6:08 am
    EditText editText = (EditText)findViewById(R.id.your_edit_text); 
    
    editText.addTextChangedListener(new TextWatcher() {
    @Override
    public void afterTextChanged(Editable arg0) {
        // TODO Auto-generated method stub
    }
    @Override
    public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) {
        // TODO Auto-generated method stub
    }
    @Override
    public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) {
        for(int i=0;i<arg0.toString().length();i++){
            if(arg0.toString().charAt(i)=='a char you hate')
                //Show an error and change the contents of arg0
        }
    }
    });
    

    EDITED

    I have edited the answer a little bit because In the previous version assumed that he changed the last character. However this is not true onTextChanged is called even if he inserted a character in the middle of the String.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We want to allow DB access (Oracle) to our users only through our own
I want to allow users to create their resume online. Resume creation will have
I want to allow users to download a file, but in order to do
I want to allow users to upload avatar-type images in a variety of formats
I want to allow users to paste <embed> and <object> HTML fragments (video players)
We have a high security application and we want to allow users to enter
I'm building a CMS in ASP.NET MVC and want to allow users to pick
I have a REST data service where I want to allow the users to
I want allow the user to customize their web pages on my ASP.NET MVC
Basically what I want to do is allow a user to type in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.