身份证提示

dev_ec
daiao 6 years ago
parent 755e2ccc3e
commit e3d1cb5fe3

@ -164,7 +164,8 @@ class User < ApplicationRecord
# validates_format_of :mail, with: VALID_EMAIL_REGEX, multiline: true
# validates_format_of :phone, with: VALID_PHONE_REGEX, multiline: true
validate :validate_password_length
validates_format_of :ID_number, with: VALID_NUMBER_REGEX, multiline: true, message: "请输入正确的身份证号"
#validate :validate_ID_number
validates_format_of :ID_number, message: "身份证号格式不对", with: VALID_NUMBER_REGEX, multiline: true
# validates :nickname, presence: true, length: { maximum: 10 }
# validates :lastname, presence: true

Loading…
Cancel
Save