Fix/validates length of min max length

https://www.openproject.org/work_packages/14632
`allowed_size_of_integer` calculates the maximum integer value for the `min_length` column.
However it is used for validating `min_length` and `max_length` (this might get us in trouble if the fields have a different type (int vs. bigint) or if they have a different limit.