[Answered ]-Django DecimalField min value validation error

0👍

You can implement your own custom validator also make sure you take min / max values from configurations / settings file instead of hardcoding .

https://www.geeksforgeeks.org/custom-field-validations-in-django-models/

1👍

use Decimal for min_value or max_value:

forms.DecimalField(min_value=Decimal('0.20'), max_value=Decimal('20.00'), max_digits=4, decimal_places=2, initial=1)

Leave a comment