Do you just require them to hit the back button if form validation fails, or do you re-generate the page?
Another way to do this might be to use javascript to validate the form in the client..
<form method="post" action="./thing.php" name="MyForm" onSubmit="return Validate()">
The Validate() goes through all the form values (under document.MyForm.<field>.value and checks for valid values; if there are problems it prints an alert, and returns 'false', which stops the form from submitting.