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

  • Home
  • SEARCH
  • 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 1096911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:21:04+00:00 2026-05-17T00:21:04+00:00

In the Twitter signup process, they do not allow you to input any character

  • 0

In the Twitter signup process, they do not allow you to input any character other than alphanumeric keywords

What would be a good way, efficient way of doing so? The plugins available seems to be a little too slow for my liking, so i was wondering if anyone had more efficient way of doing so

  • 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-17T00:21:04+00:00Added an answer on May 17, 2026 at 12:21 am

    You can listen for keydown/keypress, check the character code, and if it’s not something you want preventDefault() or return false

    Implementation

    Here’s an example with jQuery. This creates a list of ‘valid’ keycodes, initially populated with formatters (Escape, Backspace etc) and then populates the array with other valid keys.

    $('input').keydown(function(e) {
        var a=[8,9,13,16,17,18,20,27,35,36,37,38,39,40,45,46,91,92];
        var k = e.which;
    
        for (i = 48; i < 58; i++) // 0-9 on top of keyboard
            a.push(i);
        for (i = 65; i < 91; i++) // a-z
            a.push(i);
        for (i = 96; i < 106; i++) // 0-9 on numpad
            a.push(i);
    
        if (!(a.indexOf(k)>=0)) // prevents disabled keys
            e.preventDefault();
    });​
    

    You can also use this array to check validity of the username before submitting, by iterating through each character in the string and making sure it’s one of these.

    Try it out here

    http://jsfiddle.net/vRJ2v/

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

Sidebar

Related Questions

Twitter doesn't allow tweet messages longer than 140 characters. I'm using the twitter4j library
I have Laconica (self hosted twitter ) configured on my local intranet and would
I'm trying to finalize a signup process for my webapp, but am getting confused
I want to disable users from entering a character into a HTML text input
I'd like to allow users the option to register using their Twitter account. Basically,
twitter today presented new APIs Please look at User login & signup. So there
On twitter (new twitter) and facebook they now have the the ability to load
Twitter recently announced that you can approximate the rank of any given twitter user
http://twitter.com/codinghorror http://twitter.com/login These both look like twitter accounts but the second one is not.
Is there any script based on ZF, which supports normal user signup/login system, along

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.