svelte-forms-lib
svelte-forms-lib copied to clipboard
String Array prop error maping issue
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.