summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2020-07-26 19:18:59 -0700
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-07-27 12:07:53 +0200
commitcc3d24d7d577f174937a0744d886c4c7123cfa85 (patch)
treed96aa65fb38ee91158ff6908374e267df5646f9e /django/forms
parentf4e93919e4608cfc50849a1f764fd856e0917401 (diff)
Removed redundant forms.DecimalField.validate() in favor of DecimalValidator.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/fields.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/django/forms/fields.py b/django/forms/fields.py
index 36dad72704..9de2c60b35 100644
--- a/django/forms/fields.py
+++ b/django/forms/fields.py
@@ -350,13 +350,6 @@ class DecimalField(IntegerField):
raise ValidationError(self.error_messages['invalid'], code='invalid')
return value
- def validate(self, value):
- super().validate(value)
- if value in self.empty_values:
- return
- if not value.is_finite():
- raise ValidationError(self.error_messages['invalid'], code='invalid')
-
def widget_attrs(self, widget):
attrs = super().widget_attrs(widget)
if isinstance(widget, NumberInput) and 'step' not in widget.attrs: