v0.7.4
Improvements
- Added a new helper for fieldset element (#221)
import { conform } from '@conform-to/react';
<fieldset {...conform.fieldset(field, { ariaAttributes: true })>
// This is equivalent to:
<fieldset id={field.id} name={field.name} form={fieldset.form} aria-invalid={...} aria-describedby={...}>
- [Experimetnal] Introduced an option to strip empty value on
parse
(#224)
// Instead of checking if the value is an empty string:
const schema = z.object({
text: z.string().min(1, 'Email is required');
});
const submission = parse(formData, { schema });
// To supports native zod required check directly:
const schema = z.object({
email: z.string({ required_error: 'Email is required'),his
});
const submission = parse(formData, { schema, stripEmptyValue: true });
New Contributors
- @kentcdodds made their first contribution in #220
Full Changelog: v0.7.3...v0.7.4