This must also take the sign into account. What about:

```python
max_length = self.max_digits + 1 # for the sign
if self.decimal_places is None or self.decimal_places > 0:
    max_length += 1 # for the dot
```

We could also make the sign check conditional based on `min_value` and `max_value` but it would be a mess.