I'm wondering how can I retrict the input of a field in the admin to only numbers and a max of 10 digits. The "max of 10 digits" part is confusing.
The model field is this one:
id_student = models.PositiveIntegerField(primary_key=True)
How can I make sure that in the admin it gets a max of 10 digits? I'm kind of lost in the docs and imagining weird ways to achieve this, I bet there is a simple way.
EDIT
Tried adding max_length=10
, doesn't work:
id_student = models.PositiveIntegerField(primary_key=True, max_length=10)