Added length range validator and corresponding tests