From 90568539993c5f7c05a131fafc456c53a9880c83 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sun, 29 Sep 2019 10:37:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BA=AB=E4=BB=BD=E8=AF=81=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 7541c46fa..d148d5655 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -166,7 +166,7 @@ class User < ApplicationRecord validate :validate_password_length #validate :validate_ID_number #validates_format_of :ID_number, with: VALID_NUMBER_REGEX, multiline: true, message: "身份证号格式不对" - validates :ID_number, format: {with: VALID_NUMBER_REGEX, message: "身份证格式不对"} + validates :ID_number, format: {with: VALID_NUMBER_REGEX}, message: "身份证格式不对" # validates :nickname, presence: true, length: { maximum: 10 } # validates :lastname, presence: true