Class: Pastore::Params::StringValidation

Inherits:
Validation
  • Object
show all
Defined in:
lib/pastore/params/validations/string_validation.rb

Overview

Implements the validation logic for string parameters.

Instance Attribute Summary

Attributes inherited from Validation

#errors, #value

Instance Method Summary collapse

Methods inherited from Validation

#add_error, #required?, #valid?, validate!

Constructor Details

#initialize(name, value, modifier, **options) ⇒ StringValidation

Returns a new instance of StringValidation.



7
8
9
10
11
# File 'lib/pastore/params/validations/string_validation.rb', line 7

def initialize(name, value, modifier, **options)
  @format = options[:format]

  super(name, 'string', value, modifier, **options)
end