I am looking for a way to specify an IntegerField so that it has a certain maximum of digits. What I'm looking for is similar to max_length of a CharField. I have searched the internet and even in this forum, but they are all answers related to adding minimum and maximum values such as min_length and max_length or adding validators. So that they do not get confused, what interests me is to establish an IntegerField with a maximum of digits and not a maximum value. Is there a function that can provide me so that in the model a parameter can be added to this IntegerField?
E.g.:
code = models.IntegerField('Code', primary_key=True, max_digits=8)