validates length