Added error messages for length validations