Class: SequencesValidator
- Inherits:
-
ActiveModel::Validator
- Object
- ActiveModel::Validator
- SequencesValidator
- Defined in:
- app/models/concerns/sequences_validator.rb
Instance Method Summary collapse
Instance Method Details
#validate(record) ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/models/concerns/sequences_validator.rb', line 4 def validate(record) @record = record @word = record.common_word @symbol_seq = record.symbol_sequence @number_seq = record.number_sequence record.errors.add(:base, "Invalid Hashable Content") unless valid_checker end |