From 298068320a7545fdd633564abd070dc41569c3ac Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 3 Dec 2019 18:14:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E5=90=8D=E8=AE=A4=E8=AF=81=E7=9A=84?= =?UTF-8?q?=E5=A7=93=E5=90=8Dcheck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/forms/users/apply_authentication_form.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/forms/users/apply_authentication_form.rb b/app/forms/users/apply_authentication_form.rb index e0e7931b1..c7c171e31 100644 --- a/app/forms/users/apply_authentication_form.rb +++ b/app/forms/users/apply_authentication_form.rb @@ -3,7 +3,7 @@ class Users::ApplyAuthenticationForm attr_accessor :name, :show_realname, :id_number, :gender, :upload_image, :attachment_ids - validates :name, presence: true + validates :name, presence: true, length: { minimum: 2, maximum: 10 }, format: { with: CustomRegexp::LASTNAME, message: "2-10位中英文、数字" } validate :validate_ID_number validate :validate_attachment_ids