|
|
|
@ -723,8 +723,8 @@ class User < ApplicationRecord
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def validate_sensitive_string
|
|
|
|
|
raise("真实姓名包含敏感词汇,请重新输入") unless HarmoniousDictionary.clean?(lastname)
|
|
|
|
|
raise("昵称包含敏感词汇,请重新输入") unless HarmoniousDictionary.clean?(nickname)
|
|
|
|
|
raise("真实姓名包含敏感词汇,请重新输入") if lastname && !HarmoniousDictionary.clean?(lastname)
|
|
|
|
|
raise("昵称包含敏感词汇,请重新输入") if nickname && !HarmoniousDictionary.clean?(nickname)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def set_laboratory
|
|
|
|
|