Module: Mihari::Concerns::FalsePositiveValidatable

Extended by:
ActiveSupport::Concern
Includes:
FalsePositiveNormalizable
Included in:
Rule, Schemas::RuleContract
Defined in:
lib/mihari/concerns/falsepositive_validatable.rb

Overview

False positive validatable concern

Instance Method Summary collapse

Methods included from FalsePositiveNormalizable

#normalize_falsepositive

Instance Method Details

#valid_falsepositive?(value) ⇒ Boolean

Check whether a value is valid format as a disallowed data value

Parameters:

  • value (String)

    Data value

Returns:

  • (Boolean)

    true if it is valid, otherwise false



20
21
22
23
24
25
26
27
# File 'lib/mihari/concerns/falsepositive_validatable.rb', line 20

def valid_falsepositive?(value)
  begin
    normalize_falsepositive value
  rescue RegexpError
    return false
  end
  true
end