Sha256: c4609f34682619f358df83b22dee49d20288fd01d91c8e44e539b289023336fc
Contents?: true
Size: 466 Bytes
Versions: 24
Compression:
Stored size: 466 Bytes
Contents
module CC module Analyzer module MeasurementValidations class NameValidation < Validation REGEX = /^[A-Za-z0-9_\.\-]+$/ def valid? name && name.is_a?(String) && REGEX.match?(name) end def message "Name must be present and contain only letters, numbers, periods, hyphens, and underscores" end private def name object["name"] end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems