react-hook-form / resolvers

📋 Validation resolvers: Yup, Zod, Superstruct, Joi, Vest, Class Validator, io-ts, Nope, computed-types, typanion, Ajv, TypeBox, ArkType, Valibot, effect-ts and VineJS
https://react-hook-form.com/
MIT License
1.67k stars 151 forks source link

Support `@effect/schema` #666

Closed licarth closed 1 week ago

licarth commented 4 months ago

Is your feature request related to a problem? Please describe. @effect/schema is Effect's Schema library.

Describe the solution you'd like We could write a resolver to support it.

Describe alternatives you've considered N/A

Additional context @effect/schema API ref

dearlordylord commented 4 months ago

I have just started looking for an effect/schema resolver, and It's funny to see the issue created 5 days ago. What a nice issue number too. Would you need a hand in writing the resolver @licarth ?

jbmusso commented 2 months ago

To anyone interested, there's an ongoing discussion about making an Effect schema resolver here (Effect Discord server): https://discord.com/channels/795981131316985866/1227988682917675110 with an example implementation.

binaryartifex commented 2 months ago

FrostyGhostMan here from the discussion referenced by @jbmusso. just about done doing a relative like-for-like of all the tests in the zod resolver against the effect one i pasted into the discussion. The ArrayFormatter is a real life saver for parsing the errors into something react-hook-form can use. ill publish this early next week, hopefully monday. So far its handled everything ive thrown at it. Havn't tested the native validation yet, i suspect the logic for that might need looking at. ill give a shoutout here when its published.

binaryartifex commented 2 months ago

pull request is awaiting review - https://github.com/react-hook-form/resolvers/pull/676

jorisre commented 1 week ago

Released in 3.4.0.