我正在尝试使用十进制字段,最多可接受8位数字和3位小数,但它会一直说Please enter a valid value. The nearest two valid values are 12345678 and 12345679.
model.py
daily_demand = models.DecimalField(max_digits=12, decimal_places=3)
forms.py
daily_demand = forms.CharField(widget=forms.NumberInput())