Sha256: 8aa5d4f6ef0cb23f721f7a07821632d7b7b41549b974baed0426f24514313285
Contents?: true
Size: 408 Bytes
Versions: 19
Compression:
Stored size: 408 Bytes
Contents
# frozen_string_literal: true module ActiveElement module Components # Provides a convenience method for detecting a field should be classified as a phone number. module PhoneFields PHONE_FIELDS = %w[phone telephone tel mobile].freeze def phone_field?(field) PHONE_FIELDS.any? { |phone_field| field.to_s.downcase.split('_').include?(phone_field) } end end end end
Version data entries
19 entries across 19 versions & 1 rubygems