avram
avram copied to clipboard
Add a validation for time based attribute
I think it would be awesome to have a time based validator where you could say
validate_time cc_exp_date, after: 1.day.from_now
validate_time expired_at, before: 1.year.from_now
rails recently solved this with ComparisonValidator https://www.bigbinary.com/blog/rails-7-adds-comparison-validator-to-active-record