views:

64

answers:

1

how to validate a given date

+2  A: 

Prepare a time object from params and simply check it from Time.now

t1 = Time.new(params[:date])

if t1 > Time.now
       # your code 
end
Dinesh Atoliya