test validation of length