I have a model named Comments which has content=models.CharField(max_length=100) in forms I want to use "def clean_content" to raise validation error if user types characters exceeding max_length. So how to use if condition operator.
def clean_content(self):
content = self.cleaned_data.get("content")
if ????????? < 100:
return content
else:
raise forms.ValidationError(('You exceeded max number of character'))