Validated prompt with while loop