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
496 stars 82 forks source link

Added test visualizing interference on numericality equality test #76

Closed niklasdstrom closed 3 years ago

niklasdstrom commented 7 years ago

DateValidator currently interferes with active models validates_numericality_of equal_to validator.

 1) Error:
ActiveModel::Validations::DateValidator::with other validators#test_0001_does not interfere with numericality equals:
I18n::MissingInterpolationArgument: missing interpolation argument :date in "must be equal to %{date}" ({:model=>"Test record", :attribute=>"Expiration date", :value=>1.0, :count=>0} given)

Might be other similar conflicts, but this is the one i ran into.

mrcasals commented 3 years ago

Hi, @niklasdstrom! I'm closing this PR, it seems to be fixed by #77.

Thanks, though!