Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Login field validation regular expression #379

hegwin opened this Issue · 1 comment

2 participants


The default format for login field validation is:

# lib/authlogic/regex.rb

# A simple regular expression that only allows for letters, numbers, spaces, and .-_@. Just a standard login / username
# regular expression.
def self.login
  /\A\w[\w\.+\-_@ ]+$/

In the comment, it says only allows for letters, numbers, spaces, and .-_@; but from the RegExp, I see + is also allowed.


True! Good catch there. :)

I guess changing the documentation is a better idea that changing the RegEx to maintain BC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.