From 7f5114d0f1302394b50afe273197037780016283 Mon Sep 17 00:00:00 2001 From: Carl Chenet Date: Sat, 20 May 2017 15:34:34 +0200 Subject: [PATCH] Correct :username validate format --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index cf12ce0..070125d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -57,7 +57,7 @@ class User < ActiveRecord::Base VALID_USERNAME = /[A-Za-z0-9][A-Za-z0-9_-]{0,24}/ validates :username, - :format => { :with => /\A#{VALID_USERNAME}\Z/ }, + :format => { :with => /\A#{VALID_USERNAME}\z/ }, :uniqueness => { :case_sensitive => false } validates_each :username do |record,attr,value|