The clean_<field>
hooks in the forms API are for doing additional validation. It is called after the field calls its clean method. If the field does not consider the input valid then the clean_<field>
is not called. This is noted in the custom validation docs https://docs.djangoproject.com/en/stable/ref/forms/validation/
For any field, if the Field.clean() method raises a ValidationError, any field-specific cleaning method is not called. However, the cleaning methods for all remaining fields are still executed.
In your case because $90
does not validate as a float it will not be called. Instead what you should do is create a subclass of the FloatField
which cleans the input (removing $
, etc) prior to validating the input as a float.