reset

inline fun reset(newValue: T)(source)

Resets the form to a new value and clears all field metadata.

This function resets the form data to the specified value and clears all field-level state including errors, dirty flags, touched flags, and validation state. The form submission state is also reset based on the pre-validation policy.

Usage:

formState.reset(UserData(name = "", email = ""))

Parameters

newValue

The new value to reset the form to.