Closed pke closed 5 years ago
Today is 2018/11/19. My model has this validation:
validates :born_on, timeliness: { type: :date, before: lambda { 18.years.ago }}
But it fails when born_on is set to the date 2010/10/10, which would be 18 years ago.
born_on
2010/10/10
Upps. Nevermind, the input date was wrongly sent by the webform. All fine.
Today is 2018/11/19. My model has this validation:
But it fails when
born_on
is set to the date2010/10/10
, which would be 18 years ago.