mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
Remove unneeded rescue from DOB Validator (#37785)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user