From e715c4b847a8c9557dce49400e0dd309e19f7e82 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 14 Dec 2013 10:01:45 +0000 Subject: Removed default values on custom field min and max length. git-svn-id: http://svn.redmine.org/redmine/trunk@12405 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/field_format.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/redmine') diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index 399f7d150..ac27831be 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -218,10 +218,10 @@ module Redmine unless custom_field.regexp.blank? or value =~ Regexp.new(custom_field.regexp) errs << ::I18n.t('activerecord.errors.messages.invalid') end - if custom_field.min_length > 0 and value.length < custom_field.min_length + if custom_field.min_length && value.length < custom_field.min_length errs << ::I18n.t('activerecord.errors.messages.too_short', :count => custom_field.min_length) end - if custom_field.max_length > 0 and value.length > custom_field.max_length + if custom_field.max_length && custom_field.max_length > 0 && value.length > custom_field.max_length errs << ::I18n.t('activerecord.errors.messages.too_long', :count => custom_field.max_length) end end -- cgit v1.2.3 lue='8.13'>8.13 Vaadin 6, 7, 8 is a Java framework for modern Java web applications: https://github.com/vaadin/frameworkwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/documentation/layout/layout-overview.asciidoc
blob: 7a57e2a518fa8526c5e2ab9bb3a17a01b80891e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78