Sha256: f1b4083cae8f2363852a3a17c1b865d679fb2d4659d71bc664e2d9fa27ada235
Contents?: true
Size: 524 Bytes
Versions: 4
Compression:
Stored size: 524 Bytes
Contents
module NxtSchema module Validators class GreaterThanOrEqual < Validator def initialize(threshold) @threshold = threshold end register_as :greater_than_or_equal, :gt_or_eql attr_reader :threshold def build lambda do |node, value| if value >= threshold true else message = translate_error(node.locale, value: value, threshold: threshold) node.add_error(message) end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems