Class: Ronin::App::Validations::SpiderParams

Inherits:
Dry::Validation::Contract
  • Object
show all
Defined in:
lib/ronin/app/validations/spider_params.rb

Overview

Validations for form params submitted to POST /web/spider.

Constant Summary collapse

HOST_NAME_REGEX =

Regular expression to loosely validate any hostname (local or DNS).

/\A[A-Za-z0-9\._-]+\z/

Class Method Summary collapse

Class Method Details

.call(params) ⇒ Dry::Validation::Result

Initializes and calls the validation contract.

Parameters:

  • params (Hash{String => Object})

    The HTTP params to validate.

Returns:

  • (Dry::Validation::Result)

    The validation result.



96
97
98
# File 'lib/ronin/app/validations/spider_params.rb', line 96

def self.call(params)
  new.call(params)
end