Remove unneeded rescue from DOB Validator (#37785)

This commit is contained in:
Matt Jankowski
2026-02-10 11:24:23 -05:00
committed by GitHub
parent 63aac77b61
commit 66b09318ed
2 changed files with 1 additions and 3 deletions

View File

@@ -3,8 +3,6 @@
class DateOfBirthValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
record.errors.add(attribute, :below_limit) if value.present? && value.to_date > min_age.ago
rescue Date::Error
record.errors.add(attribute, :invalid)
end
private