Commit ade526ea authored by jplang's avatar jplang
Browse files

Validate length of custom field regexp (#24283).

Patch by Go MAEDA.

git-svn-id: e93f8b46-1217-0410-a6f0-8f06a7374b81
parent e7ccb20d
......@@ -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 => { Redmine::FieldFormat.available_formats }
validate :validate_custom_field
attr_protected :id
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment