fixes validation of min_length, max_length

https://www.openproject.org/work_packages/14386
https://www.openproject.org/work_packages/14403
There is no error message for the case that ``min_length`` or ``max_lengt`` are not set.