Fix/validates length of min max length

https://www.openproject.org/work_packages/14632
the same as `2**(4*8)/2-1` (this would explain the magic number)