Sha256: 428aad4259808cbc6d795839e547b4fdb98b63ddb817d4f5d86c6e318e78e850
Contents?: true
Size: 490 Bytes
Versions: 9
Compression:
Stored size: 490 Bytes
Contents
module MxitRails class Validations def self.not_blank? input return !input.blank? end def self.numeric? input return !input.blank? && input.match(/^[0-9]+$/) end def self.length? input, len return !input.blank? && (input.length == len) end def self.min_length? input, max return !input.blank? && (input.length >= max) end def self.max_length? input, max return input.blank? || (input.length <= max) end end end
Version data entries
9 entries across 9 versions & 1 rubygems