only validate new records for length

This commit is contained in:
Kyle Drake 2014-04-07 08:02:14 -04:00
parent e56587a08c
commit e01a74421a

View file

@ -196,7 +196,7 @@ class Site < Sequel::Model
errors.add :username, 'A valid user/site name is required.'
end
if values[:username].length > 32
if new? && values[:username].length > 32
errors.add :username, 'User/site name cannot exceed 32 characters.'
end