Topic: Validates Date [SOLVED]

by any chance if i want to validate a date that is formatted properly how would i do that on my model?

Last edited by moiseszaragoza (2012-06-26 09:24:02)

Re: Validates Date [SOLVED]

Have you seen validates_timeliness?

Re: Validates Date [SOLVED]

Thanks allot.
that really helps

Re: Validates Date [SOLVED]

i am trying to make sure that my end date is not before my start date

but this still lets me put my end date b4 my start date


validates :start_date, :timeliness => { :type => :date}
validates :end_date, :timeliness => {:before => lambda { :start_date }, :type => :date}