This commit is contained in:
parent
bb82b6b462
commit
7a193d6647
@ -22,6 +22,7 @@ class User < ApplicationRecord
|
|||||||
validates_format_of :cn, without: /\A-/,
|
validates_format_of :cn, without: /\A-/,
|
||||||
if: Proc.new{ |u| u.cn.present? },
|
if: Proc.new{ |u| u.cn.present? },
|
||||||
message: "is invalid. Usernames need to start with a letter."
|
message: "is invalid. Usernames need to start with a letter."
|
||||||
|
# FIXME This needs a server restart to apply values
|
||||||
validates_format_of :cn, without: /\A(#{Setting.reserved_usernames.join('|')})\z/i,
|
validates_format_of :cn, without: /\A(#{Setting.reserved_usernames.join('|')})\z/i,
|
||||||
message: "has already been taken"
|
message: "has already been taken"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user