Fix for bug 37962 - Fix min/max length validation for different line endings - reported by Alan Olmanson