pablo-abc / felte

An extensible form library for Svelte, Solid and React
https://felte.dev
MIT License
1.02k stars 44 forks source link

Bug: `errors` store is not getting updated correctly #252

Closed bhvngt closed 1 year ago

bhvngt commented 1 year ago

Describe the bug

I am trying to set errors by either calling setErrors or by updating errors store. Both of these approaches are not yielding the expected result.

Which package/s are you using?

felte (Svelte)

Environment

To reproduce

data store correctly prints and displays the updated value. However, errors is not getting updated correctly is instead updating with null value

Small reproduction example

https://svelte.dev/repl/2dca225c01c74410855ed076ac5c4b54?version=3.59.2

Screenshots

image

Additional context

I am relatively new to this awesome library. So please let me know in case if I am using it incorrectly. I tried searching the issue list but could not find any particular helpful reference for setErrors

bhvngt commented 1 year ago

Just realised that I need to use setTouched before using setErrors. Thanks once again for the awesome library.