forge42dev / remix-hook-form

Open source wrapper for react-hook-form aimed at Remix.run
MIT License
330 stars 27 forks source link

Document `preserveStringified` on `getValidatedFormData` #99

Open KarstenBuckstegge opened 2 months ago

KarstenBuckstegge commented 2 months ago

The third argument of getValidatedFormData is not described in the documentation. Therefor a string value that only contains numbers being passed into getValidatedFormData is automagically converted to a number, causing unexpected validation errors.

Documenting the preserveStringified attribute will explain that behaviour.

timvandam commented 2 months ago

I encountered this as well. Also wonder why the defaults expect everything to be json. That does not make much sense to me as pretty much all forms I implement are just raw text or numbers that zod will coerce for me