-
Notifications
You must be signed in to change notification settings - Fork 32
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(Forms): add support for minItems
/maxItems
error messages to Field.ArraySelection
#4120
feat(Forms): add support for minItems
/maxItems
error messages to Field.ArraySelection
#4120
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
minItems
/maxItems
error messages
minItems
/maxItems
error messagesminItems
/maxItems
error messages
minItems
/maxItems
error messagesminItems
/maxItems
error messages to Field.ArraySelection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding this enhancement 🫶
I will take this further and add compatibility for properties, appearance of the validaiton and translation messages.
## [10.53.0](v10.52.1...v10.53.0) (2024-10-18) ### 🐛 Bug Fixes * **Forms:** keep Iterate.Array in sync with the data context and call onChange when `countPath` changes ([#4147](#4147)) ([095ddaa](095ddaa)) * **Forms:** UI alignments of the ChildrenWithAge block ([#4137](#4137)) ([3db7201](3db7201)) * **Upload:** handle file extensions with case insensitivity ([#4138](#4138)) ([fd9d9ba](fd9d9ba)) ### ✨ Features * add `renderMessage` to useTranslation hook for line-break support ([#4125](#4125)) ([5b07bec](5b07bec)) * **Forms:** add `country` prop to Field.PostalCodeAndCity to support other countries than Norway ([#4109](#4109)) ([5095bea](5095bea)) * **Forms:** add `Form.useTranslation` hook ([#4123](#4123)) ([6f40922](6f40922)), closes [#4121](#4121) * **Forms:** add support for `minItems`/`maxItems` error messages to Field.ArraySelection ([#4120](#4120)) ([29ebe55](29ebe55)) * **Forms:** add support to set a custom `width` to fields and values ([#4142](#4142)) ([07b257f](07b257f)) * **Forms:** add validation to Field.BankAccountNumber ([#4119](#4119)) ([f70ba3d](f70ba3d)) * **Forms:** warn when a field path is declared more than one time ([#4127](#4127)) ([ca15887](ca15887))
🎉 This PR is included in version 10.53.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
With the use of JSON Schema and ajv's validation,
ArraySelection
supports settingminItems
andmaxItems
to control how many items the user can select. The validation error message types are however not exposed, thus TypeScript won't let you override them.