Class: Might::SortValueValidator::DefinedValidator

Inherits:
ActiveModel::EachValidator
  • Object
show all
Defined in:
lib/might/sort_value_validator.rb

Overview

Validates if Parameter is undefined or not

Instance Method Summary collapse

Instance Method Details

#validate_each(record, attribute, _value) ⇒ Object



15
16
17
# File 'lib/might/sort_value_validator.rb', line 15

def validate_each(record, attribute, _value)
  record.errors.add(attribute, :undefined_sort_order) if record.undefined?
end