mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-24 01:11:12 +00:00
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
This commit is contained in:
parent
9d709c0267
commit
1c44b16023
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user