Ok pseudocode:


do
get user input
if user input not ok
display error message
while user input not ok