updated min_length and max_length