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

fix(date-input): modifying validation error containing date #3694

Open
wants to merge 7 commits into
base: canary
Choose a base branch
from

Conversation

macci001
Copy link
Contributor

@macci001 macci001 commented Aug 29, 2024

Closes #3693

📝 Description

The PR fixes the date mentioned in the validation error messages of date-picker.

⛳️ Current behavior (updates)

Currently the date in the validation message of date-picker in based on the browser and not on the locale mentioned.
The reason behind this is from react-aria as it uses the browser for the validation.

Below shows the current behaviour:

  • MinValue Validation failed
    Screenshot 2024-08-29 at 11 55 33 PM
  • MinValue Validation failed(with hideTimeZone as true)
    Screenshot 2024-08-29 at 11 55 14 PM
  • MaxValue Validation failed
    Screenshot 2024-08-29 at 11 56 42 PM
  • MaxValue Validation failed(with hideTimeZone as true)
    Screenshot 2024-08-29 at 11 57 03 PM

🚀 New behavior

Below shows the new behaviour:

  • MinValue Validation failed
    Screenshot 2024-08-29 at 11 48 36 PM
  • MinValue Validation failed(with hideTimeZone as true)
    Screenshot 2024-08-29 at 11 48 58 PM
  • MaxValue Validation failed
    Screenshot 2024-08-29 at 11 51 39 PM
  • MaxValue Validation failed(with hideTimeZone as true)
    Screenshot 2024-08-29 at 11 52 01 PM

💣 Is this a breaking change (Yes/No): No

Summary by CodeRabbit

  • New Features

    • Enhanced date-picker component with improved error message formatting based on locale settings.
    • Added specific error messages for date input constraints related to minimum and maximum values.
  • Bug Fixes

    • Resolved issues with validation error handling for date inputs, ensuring accurate feedback for users.
  • Tests

    • Added new test cases to verify locale-based error messaging for minimum and maximum date values in the DateInput component.

Copy link

changeset-bot bot commented Aug 29, 2024

🦋 Changeset detected

Latest commit: 7838f48

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@nextui-org/date-input Patch
@nextui-org/date-picker Patch
@nextui-org/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Aug 29, 2024

@macci001 is attempting to deploy a commit to the NextUI Inc Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Aug 29, 2024

Walkthrough

This update introduces a patch for the @nextui-org/date-input package, enhancing date formatting in error messages for the date-picker component. It ensures that error messages align with the specified locale settings and improves validation logic by enforcing minimum and maximum value constraints, providing users with clearer feedback on date input errors.

Changes

Files Change Summary
.changeset/calm-kids-visit.md Introduced patch for date formatting in error messages and enhanced validation logic for date inputs.
packages/components/date-input/intl/messages.ts Added localization resource for date input validation messages across multiple languages.
packages/components/date-input/src/use-date-input.ts Enhanced useDateInput function with localized string formatting for validation messages.
packages/components/date-input/__tests__/date-input.test.tsx Added tests for locale-based error messaging for minimum and maximum date values.

Assessment against linked issues

Objective Addressed Explanation
DateRangePicker error message not using NextUIProvider Locale (#3693)

Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 33ae285 and 7838f48.

Files selected for processing (2)
  • packages/components/date-input/intl/messages.ts (1 hunks)
  • packages/components/date-input/src/use-date-input.ts (3 hunks)
Files skipped from review as they are similar to previous changes (1)
  • packages/components/date-input/intl/messages.ts
Additional comments not posted (4)
packages/components/date-input/src/use-date-input.ts (4)

189-190: LGTM!

The code changes are approved. The usage of useLocalizedStringFormatter with intlMessages is a good approach for generating localized validation messages.


191-204: LGTM!

The code changes are approved. The handling of the rangeUnderflow validation error by generating a localized error message using the minimum date and time zone is implemented correctly. The error message is also replaced at the correct index in the validationErrors array.


206-220: LGTM!

The code changes are approved. The handling of the rangeOverflow validation error by generating a localized error message using the maximum date and time zone is implemented correctly. The error message is also replaced at the correct index in the validationErrors array.


222-227: LGTM!

The code changes are approved. The handling of the badInput validation error by retrieving the localized error message using the string formatter is implemented correctly. The error message is also replaced at the correct index (last index) in the validationErrors array.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 56f1d68 and 9ff2e80.

Files selected for processing (2)
  • .changeset/calm-kids-visit.md (1 hunks)
  • packages/components/date-input/src/use-date-input.ts (1 hunks)
Additional comments not posted (4)
.changeset/calm-kids-visit.md (2)

1-3: LGTM!

The changeset header is correctly formatted.


5-5: Fix the grammatical error.

There is a minor grammatical error in the description. Apply this diff to fix it:

-The Date mentioned in the Error message of the date-picker is not according to the Locale. This PR adds an layer to the validationError to ensure correct formatting date in error messages.
+The date mentioned in the error message of the date-picker is not according to the locale. This PR adds a layer to the validation error to ensure correct formatting of the date in error messages.
packages/components/date-input/src/use-date-input.ts (2)

196-196: LGTM!

The construction of the error messages is correct.

Also applies to: 211-211


198-198: LGTM!

The insertion of the error messages into the validationErrors array is correct.

Also applies to: 213-213

packages/components/date-input/src/use-date-input.ts Outdated Show resolved Hide resolved
packages/components/date-input/src/use-date-input.ts Outdated Show resolved Hide resolved
@macci001 macci001 force-pushed the macci001/modifying-validation-error-containing-date branch from 9ff2e80 to fbd95e7 Compare August 29, 2024 18:39
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9ff2e80 and fbd95e7.

Files selected for processing (2)
  • .changeset/calm-kids-visit.md (1 hunks)
  • packages/components/date-input/src/use-date-input.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • .changeset/calm-kids-visit.md
Files skipped from review as they are similar to previous changes (1)
  • packages/components/date-input/src/use-date-input.ts

@macci001 macci001 changed the title Macci001/modifying validation error containing date fix(date-input): modifying validation error containing date Aug 29, 2024
@macci001
Copy link
Contributor Author

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Aug 29, 2024

Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@wingkwong wingkwong self-assigned this Aug 30, 2024
Copy link
Member

@wingkwong wingkwong left a comment

Choose a reason for hiding this comment

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

please also include test case

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (2)
packages/components/date-input/__tests__/date-input.test.tsx (2)

185-206: Approve the test case for minimum date value error messaging.

The test case correctly sets up the locale and uses parseDate for date handling, ensuring that the error message is displayed according to the locale. However, consider adding a check to ensure that the error message is not only present but also correct in terms of its content.

The test case is well-implemented and aligns with the PR objectives.

Consider enhancing the test by verifying the exact content of the error message, not just its presence.


208-229: Approve the test case for maximum date value error messaging.

This test case is structured similarly to the minimum date value test case, ensuring consistency in testing. It correctly sets up the locale and uses parseDate for date handling. As with the previous test case, consider adding a check to ensure that the error message is not only present but also correct in terms of its content.

The test case is well-implemented and aligns with the PR objectives.

Consider enhancing the test by verifying the exact content of the error message, not just its presence.

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between fbd95e7 and 49868a8.

Files selected for processing (2)
  • packages/components/date-input/tests/date-input.test.tsx (2 hunks)
  • packages/components/date-input/src/use-date-input.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • packages/components/date-input/src/use-date-input.ts
Additional comments not posted (1)
packages/components/date-input/__tests__/date-input.test.tsx (1)

4-10: Review the import statement for parseDate.

The addition of the parseDate function from @internationalized/date is appropriate for the new functionality being tested. This function is used to ensure that dates are parsed correctly according to the locale settings, which is crucial for the new test cases.

The import statement is correctly placed and necessary for the new tests.

@macci001
Copy link
Contributor Author

macci001 commented Sep 5, 2024

Hello @wingkwong ,
I have added the test here, maybe you can have a look at this again?

@wingkwong wingkwong added this to the v2.4.7 milestone Sep 5, 2024
@wingkwong
Copy link
Member

will do

Copy link

vercel bot commented Sep 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextui-docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 10, 2024 1:00pm
nextui-storybook-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 10, 2024 1:00pm

Copy link
Member

@wingkwong wingkwong left a comment

Choose a reason for hiding this comment

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

@macci001 macci001 force-pushed the macci001/modifying-validation-error-containing-date branch from 49868a8 to dd7aa1d Compare September 9, 2024 11:05
@macci001 macci001 force-pushed the macci001/modifying-validation-error-containing-date branch from dd7aa1d to fadddd6 Compare September 9, 2024 11:09
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post

Actionable comments posted: 2

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 49868a8 and dd7aa1d.

Files selected for processing (4)
  • .changeset/calm-kids-visit.md (1 hunks)
  • packages/components/date-input/tests/date-input.test.tsx (2 hunks)
  • packages/components/date-input/intl/messages.ts (1 hunks)
  • packages/components/date-input/src/use-date-input.ts (3 hunks)
Additional comments not posted (7)
.changeset/calm-kids-visit.md (1)

1-5: Clear and concise changeset description.

The changeset file accurately describes the patch update for the @nextui-org/date-input package, highlighting the focus on correcting date formatting in error messages according to the locale. This aligns well with the PR's objectives and provides clear information for version control history.

packages/components/date-input/intl/messages.ts (1)

1-138: Well-structured localization messages.

The file is well-organized, providing clear and consistent validation messages across multiple locales. The use of {date} as a placeholder is appropriate and ensures that the date can be dynamically inserted based on the actual validation logic. This setup supports the PR's goal to handle locale-specific date formatting correctly.

packages/components/date-input/__tests__/date-input.test.tsx (2)

4-10: Appropriate imports for testing.

The imports from @internationalized/date and @react-aria/i18n are necessary for the new functionality being tested. These imports allow for the parsing of dates and setting of locale, which are crucial for the tests that check locale-specific error messaging.

Also applies to: 13-13


185-229: Comprehensive tests for locale-based error messaging.

The new test cases effectively validate that the DateInput component displays error messages correctly formatted according to the specified locale. These tests are crucial for ensuring that the component behaves as expected under different locale settings, aligning with the PR's objectives to enhance locale sensitivity in error messaging.

packages/components/date-input/src/use-date-input.ts (3)

9-9: Approved: Import additions for localization.

The addition of useLocalizedStringFormatter from @react-aria/i18n is crucial for supporting localized string formatting, aligning with the PR's objectives to handle locale-specific date formats.


21-21: Approved: Import of internationalization messages.

The import of intlMessages from ../intl/messages is necessary for utilizing localized messages in the validation logic, ensuring that error messages are consistent with the locale settings.


189-189: Approved: Use of localized string formatter.

The instantiation of useLocalizedStringFormatter with intlMessages is a good practice for generating locale-specific strings, which is essential for the functionality introduced in this PR.

Comments failed to post (2)
packages/components/date-input/src/use-date-input.ts (2)

210-229: Refactor suggestion: Simplify error handling logic for maxValue.

Similar to the minValue handling, the logic for maxValue validation errors is verbose and could benefit from refactoring to improve clarity and maintainability.

Apply a similar refactor as suggested for minValue error handling:

+function handleMaxValueError(validationDetails, maxValue, locale, state, stringFormatter) {
+  const indexInValidationErrors = Number(validationDetails.badInput) +
+    Number(validationDetails.customError) +
+    Number(validationDetails.patternMismatch) +
+    Number(validationDetails.rangeUnderflow);
+  const maxValueDate = new Date(maxValue.year, maxValue.month - 1, maxValue.day).toLocaleDateString(locale);
+  const timeZone = state.segments.filter((segment) => segment.type === "timeZoneName")[0]?.text ?? "";
+  return stringFormatter.format("maxValidationMessage").replace("{date}", `${maxValueDate} ${timeZone}`);
+}
+
- if (props.maxValue != undefined && validationDetails.rangeOverflow) {
-   const indexInValidationErrors: number =
-     Number(validationDetails.badInput) +
-     Number(validationDetails.customError) +
-     Number(validationDetails.patternMismatch) +
-     Number(validationDetails.rangeUnderflow);
-   const maxValueDate = new Date(
-     maxValue.year,
-     maxValue.month - 1,
-     maxValue.day,
-   ).toLocaleDateString(locale);
-   const timeZone =
-     state.segments.filter((segment) => segment.type === "timeZoneName")[0]?.text ?? "";
-   const rangeOverflow = stringFormatter
-     .format("maxValidationMessage")
-     .replace("{date}", `${maxValueDate} ${timeZone}`);
-   validationErrors.splice(indexInValidationErrors, 1, rangeOverflow);
- }
+ if (props.maxValue != undefined && validationDetails.rangeOverflow) {
+   const rangeOverflow = handleMaxValueError(validationDetails, maxValue, locale, state, stringFormatter);
+   validationErrors.splice(indexInValidationErrors, 1, rangeOverflow);
+ }

Committable suggestion was skipped due to low confidence.


191-208: Refactor suggestion: Simplify error handling logic.

The logic for handling minValue validation errors is complex and could be simplified. Consider using helper functions to reduce complexity and improve readability.

Consider refactoring the error handling logic into a separate function to improve maintainability. Here's a suggested refactor:

+function handleMinValueError(validationDetails, minValue, locale, state, stringFormatter) {
+  const indexInValidationErrors = Number(validationDetails.badInput) +
+    Number(validationDetails.customError) +
+    Number(validationDetails.patternMismatch);
+  const minValueDate = new Date(minValue.year, minValue.month - 1, minValue.day).toLocaleDateString(locale);
+  const timeZone = state.segments.filter((segment) => segment.type === "timeZoneName")[0]?.text ?? "";
+  return stringFormatter.format("minValidationMessage").replace("{date}", `${minValueDate} ${timeZone}`);
+}
+
- if (props.minValue != undefined && validationDetails.rangeUnderflow) {
-   const indexInValidationErrors: number =
-     Number(validationDetails.badInput) +
-     Number(validationDetails.customError) +
-     Number(validationDetails.patternMismatch);
-   const minValueDate = new Date(
-     minValue.year,
-     minValue.month - 1,
-     minValue.day,
-   ).toLocaleDateString(locale);
-   const timeZone =
-     state.segments.filter((segment) => segment.type === "timeZoneName")[0]?.text ?? "";
-   const rangeUnderflow = stringFormatter
-     .format("minValidationMessage")
-     .replace("{date}", `${minValueDate} ${timeZone}`);
-   validationErrors.splice(indexInValidationErrors, 1, rangeUnderflow);
- }
+ if (props.minValue != undefined && validationDetails.rangeUnderflow) {
+   const rangeUnderflow = handleMinValueError(validationDetails, minValue, locale, state, stringFormatter);
+   validationErrors.splice(indexInValidationErrors, 1, rangeUnderflow);
+ }

Committable suggestion was skipped due to low confidence.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between dd7aa1d and fadddd6.

Files selected for processing (2)
  • packages/components/date-input/intl/messages.ts (1 hunks)
  • packages/components/date-input/src/use-date-input.ts (3 hunks)
Files skipped from review due to trivial changes (1)
  • packages/components/date-input/intl/messages.ts
Files skipped from review as they are similar to previous changes (1)
  • packages/components/date-input/src/use-date-input.ts

@macci001
Copy link
Contributor Author

macci001 commented Sep 9, 2024

Applied the suggestions in: fadddd6
Screenshot 2024-09-09 at 4 43 23 PM
// cc @wingkwong

@wingkwong
Copy link
Member

@macci001 can you explain a bit why we need to include packages/components/date-input/intl/messages.ts? supposedly this should be handled in RA side instead of us hardcoding it (?)

@macci001
Copy link
Contributor Author

macci001 commented Sep 9, 2024

Browser is responsible for the content of the validation messages and RA has no role to play in it. So in-order to cutomize error message based on the locale provided, we need to handle it by our self.
For ref: adobe/react-spectrum#6227 (comment)
// cc @wingkwong

@wingkwong
Copy link
Member

Got it. Lemme take a look later

@@ -184,6 +186,48 @@ export function useDateInput<T extends DateValue>(originalProps: UseDateInputPro
isInvalid: ariaIsInvalid,
} = useAriaDateField({...originalProps, label, validationBehavior, inputRef}, state, domRef);

const stringFormatter = useLocalizedStringFormatter(intlMessages) as any;
Copy link
Member

Choose a reason for hiding this comment

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

i think as any is not required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in: 8ac47e4

Comment on lines 192 to 195
const indexInValidationErrors: number =
Number(validationDetails.badInput) +
Number(validationDetails.customError) +
Number(validationDetails.patternMismatch);
Copy link
Member

Choose a reason for hiding this comment

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

do we need to cater rangeUnderflow as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we need rangeUnderflow here as only badInput, customError and patternMatch errors appears before rangeUnderflow error in validationErrors array. Hence, if some or all of them exist they will shift the index of rangeUnderflow in validationErrors.

But in case of rangeOverflow as we have badInput, customError , patternMatch and rangeUnderflow errors before it in validationErrors array, we need to consider all of them.

Copy link
Member

Choose a reason for hiding this comment

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

May I know where did you get this info?

Copy link
Contributor Author

@macci001 macci001 Sep 10, 2024

Choose a reason for hiding this comment

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

So I assumed that the errors in the validationField will be populated according to the occurrence of the property in ValidityState.
But seems like I made a wrong assumption, as Errors related to Bad Input are populated in validationError after rangeUnderflow and rangeOverflow by RA .(ref).

Also, while scrapping through RA code, I understood that if ValidationError has rangeUnderflow/rangeOverflow then it can only have badInput error.
Now, as we might not consider the order of errors in ValidityState as order in ValidityError, it might be bit tricky to find out which error in ValidationError list corresponds to underflow/overflow.

It is clear that if exists in ValidationError, the rangeOverflow and rangeUnderflow will be its first element. So should we edit the first value in the list?

The reason why the rangeOverflow and rangeUnderflow will always be first element:

  • ValidationErrors can either be obtained from controlledError, serverError, clientError, builtinValidation, currentValidity (ref)
  • controlledError, serverError, clientError and currentValidity => All of these does not have true for the ValidityState corresponding to rangeUnderflow, rangeOverflow and BadInput.
  • rangeOverflow / rangeUnderflow happens to be in the validation errors list if it is obtained from builtinValidation.
  • The order in which the errors are populated for builtinValidation is this.
  • Hence, the rangeOverflow / rangeUnderflow appears to be the first element if they do exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the following changes in 7838f48

  • Added support for badInput message with i18n.
  • Modifying the validationError according exactly how they were populated by RA

@macci001 macci001 force-pushed the macci001/modifying-validation-error-containing-date branch from 33ae285 to 7838f48 Compare September 11, 2024 03:38
Copy link
Member

@ryo-manba ryo-manba left a comment

Choose a reason for hiding this comment

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

I think it's hard to manage error messages by country in NextUI. Validating and maintaining each language can be costly. Since React Aria is talking to the globalization team, it might be best to wait for their updates.

In the meantime, you could use React Aria hooks to show custom error messages.
Thanks for the PR!

@wingkwong wingkwong removed this from the v2.4.7 milestone Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] - DateRangePicker error message not using NextUIProvider Locale
3 participants