-
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Given the example code from README...
import { createForm, Field, Form } from '@formisch/solid';
import * as v from 'valibot';
const LoginSchema = v.object({
email: v.pipe(v.string(), v.email()),
password: v.pipe(v.string(), v.minLength(8)),
});
export default function LoginPage() {
const loginForm = createForm({
schema: LoginSchema,
});
return (
<Form of={loginForm} onSubmit={(output) => console.log(output)}>
<Field
of={loginForm}
path={['email']}
render={(field) => (
<div>
<input {...field.props} value={field.input} type="email" />
{field.errors && <div>{field.errors[0]}</div>}
</div>
)}
/>
<Field
of={loginForm}
path={['password']}
render={(field) => (
<div>
<input {...field.props} value={field.input} type="password" />
{field.errors && <div>{field.errors[0]}</div>}
</div>
)}
/>
<button type="submit">Login</button>
</Form>
);
}...I would expect input name to be 'email' and 'password' respectively. Instead, the actual names are '["email"]' and '["password"]'. Is there a reason behind this behavior?
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested