avram icon indicating copy to clipboard operation
avram copied to clipboard

Add a validation for time based attribute

Open jwoertink opened this issue 4 years ago • 1 comments

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

jwoertink avatar Jan 28 '21 22:01 jwoertink

rails recently solved this with ComparisonValidator https://www.bigbinary.com/blog/rails-7-adds-comparison-validator-to-active-record

skojin avatar Oct 16 '21 13:10 skojin