codegram / date_validator

A simple, ORM agnostic, Ruby >=2.2 compatible date validator for Rails, based on ActiveModel.
http://thoughts.codegram.com/date-validation-with-rails-3
MIT License
495 stars 82 forks source link

Allow dates to be formatted in error messages #53

Closed crmaxx closed 9 years ago

crmaxx commented 9 years ago

Allows different formats for each type of object, e.g.: en-GB: formats: date_validator: date_time: '%d %b %I:%M %p' time: '%I:%M %p'

Falls back to :default behaviour if no translation is found.