manually set form or error

This commit is contained in:
cupcakearmy
2019-10-19 16:39:53 +02:00
parent d7a33baf21
commit 6274200c0b
2 changed files with 44 additions and 26 deletions

View File

@@ -93,5 +93,5 @@ export const useForm = <T, U extends { [key in keyof T]: useFormValidatorParamet
[opts.setter || options.setter || 'value']: form[key] as any,
})
return { form, update, field, errors, isValid }
return { form, update, field, errors, isValid, setForm, setErrors }
}