From e3d1cb5fe37361bde3cba6b5605f17e57fb2937b Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sun, 29 Sep 2019 10:04:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BA=AB=E4=BB=BD=E8=AF=81=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 83403ef61..069a29bed 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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