validating prompts - do while loops

shorter