fix the validation to check string length correctly