Sha256: cc5e742da470d9836926d2e9f682d708646d29ae52d702054c0fcec5926033d9
Contents?: true
Size: 602 Bytes
Versions: 5
Compression:
Stored size: 602 Bytes
Contents
module Validatable class ValidatesLengthOf < ValidationBase def message(instance) super || unless minimum.nil? '%s must be more than %d characters long'.t(humanized_attribute, minimum-1) else unless maximum.nil? '%s must be less than %d characters long'.t(humanized_attribute, maximum+1) else unless is.nil? '%s must be %d characters long'.t(humanized_attribute, is) else unless within.nil? '%s must be between %d and %d characters long'.t(humanized_attribute, within.first, within.last) end;end;end;end end end end
Version data entries
5 entries across 5 versions & 1 rubygems