ValidatedForm

ValidatedForm is a thin wrapper around useForm that lets you use RVF as a component instead of a hook. You can use it with a render prop to get access to the FormApi object.

Behavior differences

ValidatedForm automatically connects your form with getFormProps and automatically calls renderFormIdInput.

Additional props

The props are all the same as the FormOpts passed to useForm, except with the following additions:

formRef

A ref to the form element.

children

A render prop that accepts a FormApi object. Or just normal react children.

<ValidatedForm validator={validator} method="post">
  {(form) => <Etc />}
</ValidatedForm>