you're using server validation, right?
if so, you set the initial value for the form elements to use the validated Entries binding group.
After you add server validation to a page, look in the bindings panel, there is a validated entries biding group with a binding for each form element in the form.
the validated entries binding is populated when validation fails with the values that passed validation.
bind each form element's initial value to the corresponding validated entries biding to retain values that passed validation.