I am trying to make price field that has a maximum value. But I have seen that it is not possible to specify max value in models decimal field. Therefor I created a form decimal field which takes max value attribute but if do that I am not able to use the model's price field's properties. In models.py
price = models.DecimalField(max_digits=5, decimal_places=2)
In forms.py
price = forms.DecimalField(max_value=500)
I know I can just write all of them in forms and leave the blank and null in model's decimal field but doing that is redundant as I have many other fields.
Is there a way I can use the model's decimal field and still specify the max length and min length for that field through forms class.