Sha256: b0fb822e2b0d7a735d12e149fbc7a875c31fdcbea6c15af9ff8517f5376ae980

Contents?: true

Size: 634 Bytes

Versions: 14

Compression:

Stored size: 634 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Concerns
    #
    # False positive validatable concern
    #
    module FalsePositiveValidatable
      extend ActiveSupport::Concern

      include FalsePositiveNormalizable

      #
      # Check whether a value is valid format as a disallowed data value
      #
      # @param [String] value Data value
      #
      # @return [Boolean] true if it is valid, otherwise false
      #
      def valid_falsepositive?(value)
        begin
          normalize_falsepositive value
        rescue RegexpError
          return false
        end
        true
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mihari-8.0.2 lib/mihari/concerns/falsepositive_validatable.rb
mihari-8.0.1 lib/mihari/concerns/falsepositive_validatable.rb
mihari-8.0.0 lib/mihari/concerns/falsepositive_validatable.rb
mihari-7.6.4 lib/mihari/concerns/falsepositive_validatable.rb
mihari-7.6.3 lib/mihari/concerns/falsepositive_validatable.rb
mihari-7.6.2 lib/mihari/concerns/falsepositive_validatable.rb
mihari-7.6.1 lib/mihari/concerns/falsepositive_validatable.rb
mihari-7.6.0 lib/mihari/concerns/falsepositive_validatable.rb
mihari-7.5.0 lib/mihari/concerns/falsepositive_validatable.rb
mihari-7.4.0 lib/mihari/concerns/falsepositive_validatable.rb
mihari-7.3.2 lib/mihari/concerns/falsepositive_validatable.rb
mihari-7.3.1 lib/mihari/concerns/falsepositive_validatable.rb
mihari-7.3.0 lib/mihari/concerns/falsepositive_validatable.rb
mihari-7.2.0 lib/mihari/concerns/falsepositive_validatable.rb