svelte-forms-lib icon indicating copy to clipboard operation
svelte-forms-lib copied to clipboard

String Array prop error maping issue

Open ankitpatial opened this issue 2 years ago • 0 comments

I was using the following schema.

  const { form, errors, handleChange, handleSubmit } = createForm({
    initialValues: { name: '', description: '', features: [''] },
    validationSchema: object().shape({
      name: string().required('name is required'),
      description: string().required('description is required'),
      features: array().of(string().required('required'))
    }),
  });

Probleam i see is that my schema.features list is not bind error properly. It seems to be related with prop name mapping issue while assiging error.

With this fix it started working for me.

ankitpatial avatar Jun 08 '23 11:06 ankitpatial