Skip to content

Conversation

igorbrasileiro
Copy link
Contributor

related to #796

@bluebill1049 bluebill1049 requested review from jorisre and Copilot and removed request for jorisre July 25, 2025 00:24
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds ajv-formats support to the ajvResolver, enabling validation of string formats like email, date, and URI patterns. This addresses issue #796 by providing out-of-the-box format validation capabilities.

Key Changes

  • Added ajv-formats dependency to both root package.json and ajv package.json
  • Integrated ajv-formats into the ajvResolver by importing and applying the format validators

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
package.json Added ajv-formats as a dev dependency in the root package
ajv/src/ajv.ts Imported and applied ajv-formats to the Ajv instance
ajv/package.json Added ajv-formats as a runtime dependency for the ajv resolver package
Comments suppressed due to low confidence (1)

ajv/package.json:17

  • This line shows a removal marker (-) but ajv-errors should remain as a dependency. This appears to be a diff formatting error - the line should not be marked for removal.
    "ajv-errors": "^3.0.0",

jorisre
jorisre previously approved these changes Jul 25, 2025
Copy link
Member

@jorisre jorisre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@igorbrasileiro
Copy link
Contributor Author

igorbrasileiro commented Jul 25, 2025

@jorisre can you help me to make this CI / Lint pass? I think the problem is related to different majors of biome.

I tried to change biome version to 1.8.3 and run bun lint and no problem appeared.

$ bun lint
bunx @biomejs/biome@^1.8.3 check --write --vcs-use-ignore-file=true .
Checked 163 files in 31ms. No fixes applied.

@jorisre
Copy link
Member

jorisre commented Jul 25, 2025

@jorisre can you help me to make this CI / Lint pass? I think the problem is related to different majors of biome.

I tried to change biome version to 1.8.3 and run bun lint and no problem appeared.

$ bun lint
bunx @biomejs/biome@^1.8.3 check --write --vcs-use-ignore-file=true .
Checked 163 files in 31ms. No fixes applied.

In the package.json, can you change the "lint": ... script to this one please ?

"lint": "biome check --write --vcs-use-ignore-file=true .",

Thanks :)

@igorbrasileiro
Copy link
Contributor Author

In the package.json, can you change the "lint": ... script to this one please ?
"lint": "biome check --write --vcs-use-ignore-file=true .",
Thanks :)

Done

@igorbrasileiro igorbrasileiro requested a review from jorisre July 25, 2025 11:52
@jorisre jorisre merged commit f040039 into react-hook-form:master Jul 25, 2025
4 checks passed
Copy link
Contributor

🎉 This PR is included in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

peterj added a commit to kagent-dev/kagent that referenced this pull request Aug 17, 2025
![snyk-top-banner](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests/pr-banner-default.svg)


<h3>Snyk has created this PR to upgrade @hookform/resolvers from 5.1.1
to 5.2.0.</h3>

:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.

<hr/>


- The recommended version is **1 version** ahead of your current
version.

- The recommended version was released **22 days ago**.



<details>
<summary><b>Release notes</b></summary>
<br/>
  <details>
    <summary>Package name: <b>@hookform/resolvers</b></summary>
    <ul>
      <li>
<b>5.2.0</b> - <a
href="https://redirect.github.com/react-hook-form/resolvers/releases/tag/v5.2.0">2025-07-25</a></br><h1><a
href="https://redirect.github.com/react-hook-form/resolvers/compare/v5.1.1...v5.2.0">5.2.0</a>
(2025-07-25)</h1>
<h3>Features</h3>
<ul>
<li><strong>ajv:</strong> add ajv-formats for ajvResolver (<a
href="https://redirect.github.com/react-hook-form/resolvers/issues/797"
data-hovercard-type="pull_request"
data-hovercard-url="/react-hook-form/resolvers/pull/797/hovercard">#797</a>)
(<a
href="https://redirect.github.com/react-hook-form/resolvers/commit/f04003972a3cc7875beb073ff88c942deb6a2086">f040039</a>)</li>
</ul>
      </li>
      <li>
<b>5.1.1</b> - <a
href="https://redirect.github.com/react-hook-form/resolvers/releases/tag/v5.1.1">2025-06-09</a></br><h2><a
href="https://redirect.github.com/react-hook-form/resolvers/compare/v5.1.0...v5.1.1">5.1.1</a>
(2025-06-09)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>zod peer dep issue (<a
href="https://redirect.github.com/react-hook-form/resolvers/issues/780"
data-hovercard-type="pull_request"
data-hovercard-url="/react-hook-form/resolvers/pull/780/hovercard">#780</a>)
(<a
href="https://redirect.github.com/react-hook-form/resolvers/commit/79cd8b284da29a5a42cd5fdafa2e767747fcfcf7">79cd8b2</a>)</li>
</ul>
      </li>
    </ul>
from <a
href="https://redirect.github.com/react-hook-form/resolvers/releases">@hookform/resolvers
GitHub release notes</a>
  </details>
</details>

---

> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - This PR was automatically created by Snyk using the credentials of a
real user.

---

**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs._

**For more information:** <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiJhMWRjYjYwNy05YjI0LTQyYTUtYTRhNC1jYjQxMmVlMWFlMDEiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6ImExZGNiNjA3LTliMjQtNDJhNS1hNGE0LWNiNDEyZWUxYWUwMSJ9fQ=="
width="0" height="0"/>

> - 🧐 [View latest project
report](https://app.snyk.io/org/kagent/project/3a1ab099-8f8f-43a5-81e6-e07ff34c96dc?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template)
> - 🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/kagent/project/3a1ab099-8f8f-43a5-81e6-e07ff34c96dc/settings/integration?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/kagent/project/3a1ab099-8f8f-43a5-81e6-e07ff34c96dc/settings/integration?pkg&#x3D;@hookform/resolvers&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)

[//]: #
'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@hookform/resolvers","from":"5.1.1","to":"5.2.0"}],"env":"prod","hasFixes":false,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":[],"prId":"a1dcb607-9b24-42a5-a4a4-cb412ee1ae01","prPublicId":"a1dcb607-9b24-42a5-a4a4-cb412ee1ae01","packageManager":"npm","priorityScoreList":[],"projectPublicId":"3a1ab099-8f8f-43a5-81e6-e07ff34c96dc","projectUrl":"https://app.snyk.io/org/kagent/project/3a1ab099-8f8f-43a5-81e6-e07ff34c96dc?utm_source=github&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":[],"type":"auto","upgrade":[],"upgradeInfo":{"versionsDiff":1,"publishedDate":"2025-07-25T12:52:52.510Z"},"vulns":[]}'

Co-authored-by: snyk-bot <[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