in reply to What are acceptable web user id & password?

I've not heard of any standard for it, but my first thought would be to limit usernames to [a-zA-Z0-9_-]+ since they are often displayed, and allow anything at all in passwords (with the possible exception of whitespace) so people can have secure passwords.

You might also consider something like Data::Password::Check, although, while it looks like a good starting point, it could do with extra features (such as "password not based on a dictionary word". I don't know if better modules exist for that type of thing.

Replies are listed 'Best First'.
Re^2: What are acceptable web user id & password?
by tariqahsan (Beadle) on Jun 05, 2006 at 15:03 UTC
    I was told it has to be non-white space and non-XML
    special characters along with being alphanumeric
    How can achieve this pattern matching for 1 to many
    occurences of such acceptable characters?

    Thanks!

      No alphanumeric character is an XML special character or a whitespace character, so having those additional constraints makes no difference.

      Just test that it is alphanumeric; taking the hyphan and underscore out of my previous regex will give you that.