平台密码的验证

dev_daiao
cxt 5 years ago
parent b0f359e548
commit 72a37d74c7

@ -183,7 +183,7 @@ class User < ApplicationRecord
#validates_format_of :ID_number, with: VALID_NUMBER_REGEX, multiline: true, message: "身份证号格式不对"
# validates :nickname, presence: true, length: { maximum: 10 }
# validates :lastname, presence: true
validates :password, with: VALID_PASSWORD_REGEX, message: "8~16位密码支持字母数字和符号"
validates_format_of :password, with: VALID_PASSWORD_REGEX, multiline: true, message: "8~16位密码支持字母数字和符号"
# 删除自动登录的token一旦退出下次会提示需要登录
def delete_autologin_token(value)

Loading…
Cancel
Save