From: Jean-Philippe Lang Date: Wed, 4 Jan 2017 20:55:38 +0000 (+0000) Subject: Validate length of custom field regexp (#24283). X-Git-Tag: 3.4.0~462 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1c44b16023f5583a496563506ad4c4f7e5ccfbd2;p=redmine.git Validate length of custom field regexp (#24283). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16134 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 400ee56b5..717df95e8 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -32,7 +32,7 @@ class CustomField < ActiveRecord::Base validates_presence_of :name, :field_format validates_uniqueness_of :name, :scope => :type validates_length_of :name, :maximum => 30 - validates_length_of :regexp, maximum: 30 + validates_length_of :regexp, maximum: 255 validates_inclusion_of :field_format, :in => Proc.new { Redmine::FieldFormat.available_formats } validate :validate_custom_field attr_protected :id