Class: TasksScheduler::CronSchedulingValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- TasksScheduler::CronSchedulingValidator
- Defined in:
- lib/tasks_scheduler/cron_scheduling_validator.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/tasks_scheduler/cron_scheduling_validator.rb', line 7 def validate_each(record, attribute, value) return if value_valid?(value) record.errors.add(attribute, [:message] || I18n.t(:cron_scheduling_validator_error_message)) end |