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)
- [Answered ]-Django HTML for loop not showing corresponding values
- [Answered ]-Can't delete user after removing app
- [Answered ]-Where should I put the code for a Django admin action for a third party app?
- [Answered ]-Django: provide month and year number as parameter in a template for use in template tag
- [Answered ]-U'__module__' error on creating inline formset
Source:stackexchange.com