敏感词汇验证报错

dev_static
daiao 5 years ago
parent b696363d9f
commit 8c08d52a5f

@ -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

Loading…
Cancel
Save