Manual form validation - how to return user-entered data?

I have a form and I want to perform some validation on the fields (not
with
validate_smth because it’s not in the model)

How do I redirect back to the form so that the fields are filled with
previous data? I manage to get the validation message but the fields
come
empty.

Radek