Class: Pastore::Params::DateValidation

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

Overview

Implements the validation logic for date 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) ⇒ DateValidation

Returns a new instance of DateValidation.



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

def initialize(name, value, modifier, **options)
  @min = options[:min]
  @max = options[:max]
  @clamp = options[:clamp]

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