codegram/date_validator — Issue #22: Fails on :allow_blank => true
Author: konung
Created: 2011-11-17 22:08:36+00:00
State: open

Hello.

I was trying to use gem to do some validation, and ran into a problem:

trying to do validation like so:

validates :delivery_date, :allow_blank => true, :date => {:after => Date.today, :before => Date.today + 30.days }

I keep getting "invalid date" error if the attribute is blank ( which it should allow for if the user didn't specify anything )

Am I doing something wrong?