Adds length validation