I am learning django and created a Page form class like so:
from django import forms
class Page(forms.Form):
title = forms.CharField(max_length = 200, min_length = 10)
body = forms.CharField(min_length = 200, max_length = 8000)
author = forms.CharField(min_length = 5, max_length = 60)
price = forms.FloatField(min_value = 10, max_value = 50)
I fiddled with it in the interactive shell and found out that when I enter an integer, it simply accepts and validates all the fields although it did convert the integer to string first.
Isn't it plainly problematic? I mean I would not want any digit or any symbol in the Author field. Do I need to write my additional clean_author method or do I have any other django Form class at my disposal to address exactly this issue??