i am trying to set the min_value Attribute on Form level within my modelform.
Forms.py
class ProductForm(forms.models.ModelForm):
class Meta:
model = Artikel
localized_fields = '__all__'
fields = ('price',)
Model.py
class Artikel(models.Model):
price = models.FloatField(help_text ='Price')
How can i setup the modelform that i can constrain the values allowed on the modelform? I want the user to only enter values greater than or equal to 0.01. I dont want to restricted on Database Level cause i dont want to limit myself in that regard.