Sha256: 21a1d533e63c359373f81b2964f4d3b09ecb856aacd1448d5b3ae30c788434da
Contents?: true
Size: 317 Bytes
Versions: 7
Compression:
Stored size: 317 Bytes
Contents
module Compel module Validation class MaxLength < Condition def validate_value unless valid? "cannot have length greater than #{option_value}" end end private def valid? !value.nil? && "#{value}".length <= option_value end end end end
Version data entries
7 entries across 7 versions & 1 rubygems