Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(standard-schema): add standard-schema resolver #738

Merged

Conversation

apple-yagi
Copy link
Contributor

Added a standard-schema resolver. This allows the use of validation libraries that conform to the standard-schema specification, such as Zod, ArkType, and others.

@jorisre
Copy link
Member

jorisre commented Feb 3, 2025

Thanks a lot for your contribution! Could you add the missing tests, similar to those in other resolvers?

@apple-yagi apple-yagi force-pushed the feat/standard-schema-resolver branch from 213a5fe to b50e30a Compare February 3, 2025 11:59
@apple-yagi
Copy link
Contributor Author

@jorisre I've fixed it!

@jorisre
Copy link
Member

jorisre commented Feb 3, 2025

Thanks! It will be released in the next major update in a few weeks.

@jorisre jorisre merged commit b75a95a into react-hook-form:master Feb 3, 2025
4 checks passed
@apple-yagi apple-yagi deleted the feat/standard-schema-resolver branch February 3, 2025 23:38
Copy link
Contributor

🎉 This PR is included in version 4.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

alexandresoro pushed a commit to alexandresoro/ouca-web that referenced this pull request Feb 10, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@hookform/resolvers](https://react-hook-form.com) ([source](https://github.com/react-hook-form/resolvers)) | dependencies | major | [`3.10.0` -> `4.0.0`](https://renovatebot.com/diffs/npm/@hookform%2fresolvers/3.10.0/4.0.0) |

---

### Release Notes

<details>
<summary>react-hook-form/resolvers (@&#8203;hookform/resolvers)</summary>

### [`v4.0.0`](https://github.com/react-hook-form/resolvers/releases/tag/v4.0.0)

[Compare Source](react-hook-form/resolvers@v3.10.0...v4.0.0)

##### Bug Fixes

-   add support for names option ([#&#8203;713](react-hook-form/resolvers#713)) ([985c48d](react-hook-form/resolvers@985c48d))
-   **arktypeResolver:** resolve type error when schema is defined from an ArkType scope ([#&#8203;732](react-hook-form/resolvers#732)) ([3233667](react-hook-form/resolvers@3233667))
-   handle `raw: true` option to pass form submission values correctly ([#&#8203;733](react-hook-form/resolvers#733)) ([7807f95](react-hook-form/resolvers@7807f95))
-   **validateFieldsNatively:** handle undefined object when reading 'refs' ([#&#8203;734](react-hook-form/resolvers#734)) ([3da2054](react-hook-form/resolvers@3da2054))

##### Features

-   **ajv:** Keep original validation type while using `errorMessage` ([#&#8203;728](react-hook-form/resolvers#728)) ([5030a59](react-hook-form/resolvers@5030a59))
-   **effectResolver:** returns either all errors or only the first one based on criteriaMode ([#&#8203;737](react-hook-form/resolvers#737)) ([12d7d8e](react-hook-form/resolvers@12d7d8e))
-   **standard-schema:** add standard-schema resolver ([#&#8203;738](react-hook-form/resolvers#738)) ([b75a95a](react-hook-form/resolvers@b75a95a))

##### BREAKING CHANGES

-   **ajv:** The AJV Resolver now unwraps the `errorMessage` object to return the original error types. This update may introduce breaking changes to your projects.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjQuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: https://git.tristess.app/alexandresoro/ouca-web/pulls/87
Reviewed-by: Alexandre Soro <[email protected]>
Co-authored-by: renovate <[email protected]>
Co-committed-by: renovate <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants