The Prompt API is your friend here. But why not have the validation happen as the users fill in the prompts?
Look up the setValidator function in the help, it has some decent examples.
Look up the setValidator function in the help, it has some decent examples.