fixes validation of min_length, max_length
adds spec for non-negative min/max length
Merge pull request #1686 from opf/fix/validations_for_min_max_length2