movpushmov / effector-reform

make & use forms without a headache
https://movpushmov.dev/effector-reform/
MIT License
19 stars 3 forks source link

clearOuterErrorOnChange doesnt work properly #21

Closed At-Sky closed 2 months ago

At-Sky commented 2 months ago
const $$form= createForm({
  schema: {
    email: createField<string>("", { clearOuterErrorOnChange: true }),
  },
  validation: zodAdapter(
    z.object({
      email: z.string().min(1, "Required").email("InvalidEmail"),
    }),
  ),
  validationStrategies: ["blur"],
});
  const form = useForm($$stages.output.$$checkEmailForm);
  const { value, onChange, onBlur, onFocus, error, isValid } = useField($$stages.output.$$form.fields.email);

no matter what, doesnt reset errors on input change also for some reason applies only last error from zod

movpushmov commented 2 months ago

fixed in 0.11