module Validation def validate_max_length(string, length) string.length <= length end def validate_min_length(string, length) string.length >= length end def validate_range(number, from, to) (from..to).cover?(number) end end