summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-03-04 15:29:16 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-03-04 15:29:16 -0500
commitba0b145820b29719e6bc9724d9d91682e4118686 (patch)
treefaa1bda8e15a1e9dbd045ac563007fd5e1611bb5 /app/models/user.rb
parente4ae559d8189519586e044238196ee45b2a10c6b (diff)
foo
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb18
1 files changed, 2 insertions, 16 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 23caf84..bd96223 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -13,26 +13,12 @@ class User < ActiveRecord::Base
##
# VAILD_EMAIL is the regex used to validate a user given email.
- #
- # A break down of the regex is listed below.
- #
- # / -------------> Start of the regex
- # \A ------------> match start of a string
- # [\w+\-.]+ -----> at least one word character, plus, hyphen,
- # or dot
- # @ -------------> literal ampersand
- # [a-z\d\-.]+ ---> at least one letter, digit, hyphen, or dot
- # (?:\.[a-z]+) --> ensures that the error of example@foo..com
- # does not occur
- # \z ------------> match end of a string
- # / -------------> end of the regex
- # i -------------> case insensitive
- VALID_EMAIL_REG = /\A[\w+\-.]+@[a-z\d\-.]+(?:\.[a-z]+)\z/i
+ VALID_EMAIL_REG = /^\S+@\S+\.\S+$/i
##
# VALID_USER_NAME checks to make sure a user's user_name
# is in the proper format.
- VALID_USER_NAME_REG = /[a-zA-Z0-9\-]/
+ VALID_USER_NAME_REG = /^[a-zA-Z0-9\-]+$/
##
# The following lines put a user account through a series of