Skip to content

Instantly share code, notes, and snippets.

@tikitikipoo
Created April 8, 2013 02:19
Show Gist options
  • Save tikitikipoo/5333722 to your computer and use it in GitHub Desktop.
Save tikitikipoo/5333722 to your computer and use it in GitHub Desktop.
# 使わせていただきます https://github.com/binarylogic/authlogic/blob/master/lib/authlogic/regex.rb
# user idの正規表現
# 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\.+\-_@ ]+\z/
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment