- a96199b: Fail gracefully if an undefined schema is encountered
- 474563b: Add
setError
function to manually set or clear form errors - 72d8a73: Support for intersections and unions in the Zod schema
- 6f9613c: Export FieldChain helper type from the lib
- f403cf8: Remove lib export of internal register function
- f403cf8: Properly pass through the correct Zod schema types to the field chain using a second InnerSchema type param
- 55e323b: Store formValues in a ref to prevent unnecessary rerenders
- b9a77a9: Fix an issue where controlled fields with a nullable value would break the types
- d7721ea: Update types to allow any zod type as a schema
- 9c2a91f: Remove unnecessary NonNullable on field chain
- bb63c81: Support passing a custom ref into registered elements
- 50b5f21: Disable validation on change after a reset until the next submit event
- bb41db3: Update packages
- f81a532: Rename
FieldControls
type toField
- f81a532: Stable release!
- f81a532: Rename
Field
type toControlledField
- e7966d6: Add Errors component to display simple field errors
- 71bece3: Changed name of
errors
fn tofieldErrors
to be clearer about it's function - e8eb654: Add helper functions for watching a value and directly setting a value
- b97da5c: Support nullable and optional zod schemas in the fields object type
- 06966d6: Decouple register fn from useForm hook
-
616791d: Introduce
errors
helper fn.This is a breaking change that removes the
errors
object from the return ofuseForm
, and instead introduces a global functionerrors()
that takes a field and returns an array of ZodIssues.
- dccb92c: Update packages
- f889c10: Don't apply Partial to custom field if type is an array
-
8c6590a: Remove useField hook and replace with a "controlled" method.
This allows for more ergonomic usage of custom elements, as you can now wrap a custom field with
controlled
like so and it will give youvalue
,onChange
etc.const schema = z.object({ myInput: z.string() }); const { fields } = useForm({ schema }); const { value, onChange } = controlled(fields.myInput);
- 1b854ed: Add support for radio fields
- 7f71035: Allow symbol access to proxies for introspection
- 721abd5: Always init Proxy with object
- 97a35ee: Remove peer deps from bundle
- b850d0b: Initial release