daiao 5 years ago
parent ca92ed7a27
commit c04b80cfed

@ -165,8 +165,8 @@ class User < ApplicationRecord
# validates_format_of :phone, with: VALID_PHONE_REGEX, multiline: true
validate :validate_password_length
#validate :validate_ID_number
validates_format_of :ID_number, with: VALID_NUMBER_REGEX, multiline: true, message: "身份证号格式不对"
#validates_format_of :ID_number, with: VALID_NUMBER_REGEX, multiline: true, message: "身份证号格式不对"
validates :ID_number, format: {with: VALID_NUMBER_REGEX, message: "身份证格式不对"}
# validates :nickname, presence: true, length: { maximum: 10 }
# validates :lastname, presence: true

Loading…
Cancel
Save