mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: all basic integer settings should have max value validation
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
class IntegerSettingValidator
|
||||
def initialize(opts={})
|
||||
@opts = opts
|
||||
@opts[:min] = 0 unless @opts[:min].present?
|
||||
@opts[:max] = 20000 unless @opts[:max].present?
|
||||
end
|
||||
|
||||
def valid_value?(val)
|
||||
|
||||
Reference in New Issue
Block a user