adds validation for min-max length
adds specs for validation of min,max_length
adds consistency to hash syntax
Merge pull request #1669 from opf/fix/validations_for_min_max_length

adds validation for min-max length