Added validation to app.prompt()