validates_timeliness
validates_timeliness copied to clipboard
tod support
When I serialize the time field using https://github.com/jackc/tod, I get "not a valid time" error from validates_timeliness.
# my_model.rb
class MyModel < ApplicationRecord
validates_time :closes_at, after: :opens_at
serialize :opens_at, Tod::TimeOfDay
serialize :closes_at, Tod::TimeOfDay
end
MyModel.where(opens_at: "10:30", closes_at: "14:30").first_or_create
# Closes at is not a valid time