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

issue: Custom validation message not shown when using native validation since 7.21.0 #10348

Closed
1 task done
ettoredn opened this issue Apr 26, 2023 · 0 comments
Closed
1 task done
Labels
regression Regression with code change

Comments

@ettoredn
Copy link

Version Number

7.21.0

Codesandbox/Expo snack

https://codesandbox.io/s/misty-platform-6gdsmn?file=/src/App.tsx

Steps to reproduce

  1. Input less then 10 characters
  2. Submit

In v7.20.5 it works.

Expected behaviour

Custom error message is shown

What browsers are you seeing the problem on?

Firefox, Chrome

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@bluebill1049 bluebill1049 added the regression Regression with code change label Apr 27, 2023
fkoulen added a commit to ASVGay/the-rhapsodies that referenced this issue Jun 13, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [react-hook-form](https://www.react-hook-form.com)
([source](https://togithub.com/react-hook-form/react-hook-form)) |
[`7.43.9` ->
`7.44.3`](https://renovatebot.com/diffs/npm/react-hook-form/7.43.9/7.44.3)
|
[![age](https://badges.renovateapi.com/packages/npm/react-hook-form/7.44.3/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/react-hook-form/7.44.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/react-hook-form/7.44.3/compatibility-slim/7.43.9)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/react-hook-form/7.44.3/confidence-slim/7.43.9)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>react-hook-form/react-hook-form</summary>

###
[`v7.44.3`](https://togithub.com/react-hook-form/react-hook-form/releases/tag/v7.44.3):
Version 7.44.3

[Compare
Source](https://togithub.com/react-hook-form/react-hook-form/compare/v7.44.2...v7.44.3)

🦉 fix: add named component export
([#&#8203;10486](https://togithub.com/react-hook-form/react-hook-form/issues/10486))
💭 fix React import inconsistency
([#&#8203;10479](https://togithub.com/react-hook-form/react-hook-form/issues/10479))
🏙️ fix: removed code from the README updater which was trying to read a
non-existent `docs/Helpers.yaml`
📝 fix doc: update urls from /api to /docs
([#&#8203;10468](https://togithub.com/react-hook-form/react-hook-form/issues/10468))

thanks to [@&#8203;Moshyfawn](https://togithub.com/Moshyfawn)
@&#8203;[@&#8203;protofarer](https://togithub.com/protofarer)
[@&#8203;farfromrest](https://togithub.com/farfromrest)

###
[`v7.44.2`](https://togithub.com/react-hook-form/react-hook-form/releases/tag/v7.44.2):
Version 7.44.2

[Compare
Source](https://togithub.com/react-hook-form/react-hook-form/compare/v7.44.1...v7.44.2)

🪟 fix
[#&#8203;10456](https://togithub.com/react-hook-form/react-hook-form/issues/10456)
`object.hasown` replaced with `hasOwnProperty`
([#&#8203;10458](https://togithub.com/react-hook-form/react-hook-form/issues/10458))

###
[`v7.44.1`](https://togithub.com/react-hook-form/react-hook-form/releases/tag/v7.44.1):
Version 7.44.1

[Compare
Source](https://togithub.com/react-hook-form/react-hook-form/compare/v7.44.0...v7.44.1)

🐞 fix `<Form />` component content-type json type missing
([#&#8203;10454](https://togithub.com/react-hook-form/react-hook-form/issues/10454))

###
[`v7.44.0`](https://togithub.com/react-hook-form/react-hook-form/releases/tag/v7.44.0):
Version 7.44.0

[Compare
Source](https://togithub.com/react-hook-form/react-hook-form/compare/v7.43.9...v7.44.0)

📄 New `<Form />` Component
([react-hook-form/react-hook-form#9735)

https://react-hook-form.com/docs/useform/form

-   add try and catch for JSON.stringify

```tsx
// Send post request with formData
<Form
  action="/api"
  control={control}
  onSuccess={() => {
    alert("Great");
  }}
/>

// Send post request with json form data
<Form action="/api" encType="application/json" headers={{ accessToken: 'test' }}> 
  {errors.root?.server.type === 500 && 'Error message'}
  {errors.root?.server.type === 400 && 'Error message'}
</Form>

// Send post request with formData with fetch
<Form
  onSubmit={async ({ formData, data, formDataJson, event }) => {
    await fetch("api", {
      method: "post",
      body: formData,
    });
  }}
/>
```

🗝️ support TransformedValues with useFormContext
([react-hook-form/react-hook-form#10322)

```tsx
useFormContext<FormValue, TransformedValues>()
```

🚔 added TTransformedValues to FormProvider
([react-hook-form/react-hook-form#10368)

```tsx
FormProviderProps<TFieldValues, TContext, TTransformedValues>
```

🐞 fix
[react-hook-form/react-hook-form#10139
with errors diff from the previous with field array action
([react-hook-form/react-hook-form#10216)
🐞 related
[react-hook-form/react-hook-form#10238
return default values in watch and useWatch when reset is called with an
empty object
🦮 remove unnecessary as unknown as cast
([react-hook-form/react-hook-form#10300)
🧛‍♂️ close
[react-hook-form/react-hook-form#10277
remove pattern empty string check
([react-hook-form/react-hook-form#10279)
🐞 fix
[react-hook-form/react-hook-form#9037
bugs that occur in the presence of Array polyfills
([react-hook-form/react-hook-form#10328)
🫥 close
[react-hook-form/react-hook-form#10348
stop shouldUseNativeValidation pass down constraint props
([react-hook-form/react-hook-form#10350)
😵‍💫 close
[react-hook-form/react-hook-form#10386
re-register controller input to fix strict mode
([react-hook-form/react-hook-form#10418)
✍️ update form.tsx for TSdoc
([react-hook-form/react-hook-form#10399)

thanks to [@&#8203;yasamoka](https://togithub.com/yasamoka) &
[@&#8203;Torvin](https://togithub.com/Torvin)
[@&#8203;ryota-murakami](https://togithub.com/ryota-murakami) &
[@&#8203;devakrishna33](https://togithub.com/devakrishna33)

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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 [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/ASVGay/the-rhapsodies).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTUuMiIsInVwZGF0ZWRJblZlciI6IjM1LjExNS4yIiwidGFyZ2V0QnJhbmNoIjoiZGV2In0=-->
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
regression Regression with code change
Projects
None yet
Development

No branches or pull requests

2 participants