Skip to content

Feat/2595 input validation radio#2537

Draft
khathija-ahamadi wants to merge 4 commits into
mainfrom
feat/2595-input-validation-radio
Draft

Feat/2595 input validation radio#2537
khathija-ahamadi wants to merge 4 commits into
mainfrom
feat/2595-input-validation-radio

Conversation

@khathija-ahamadi

@khathija-ahamadi khathija-ahamadi commented May 5, 2026

Copy link
Copy Markdown
Collaborator

💡 What is the current behavior?
There are some errors which prevent validations from happening as expected.

GitHub Issue Number: #1799
JIRA: IX-2595

🆕 What is the new behavior?
The acceptance criteria for this ticket has been met for radio component:

Required input:
Invalid input > Removing value with keyboard > Stays invalid
Invalid input > Remove touched state (e.g. clear button) > Valid again
Invalid input > Programmatically setting it to empty > Stays invalid
Valid input > Removing value with keyboard > It is invalid
Valid input > Remove touched state (e.g. autoclear button) > Valid
Valid input > Programmatically setting it to empty > It is invalid

Not required input:
Invalid input > Removing value with keyboard > Valid
Invalid input > Remove touched state (e.g. clear button) > Valid again
Invalid input > Programmatically setting it to empty > Valid
Valid input > Removing value with keyboard > Valid
Valid input > Remove touched state (e.g. clear button) > Valid
Valid input > Programmatically setting it to empty > Valid

Also form 'novalidate' cases is handled.

🏁 Checklist

A pull request can only be merged if all of these conditions are met (where applicable):

  • 🦮 Accessibility (a11y) features were implemented
  • 🗺️ Internationalization (i18n) - no hard coded strings
  • 📲 Responsiveness - components handle viewport changes and content overflow gracefully
  • 📕 Add or update a Storybook story
  • 📄 Documentation was reviewed/updated siemens/ix-docs
  • 🧪 Unit tests were added/updated and pass (pnpm test)
  • 📸 Visual regression tests were added/updated and pass (Guide)
  • 🧐 Static code analysis passes (pnpm lint)
  • 🏗️ Successful compilation (pnpm build, changes pushed)

👨‍💻 Help & support

@changeset-bot

changeset-bot Bot commented May 5, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 72fcd01

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a clear method to radio and radio-group components and implements a comprehensive validation system for handling touched states and form submissions, alongside a refactor of React component type definitions. The review feedback identifies necessary corrections to validation logic to ensure group states update correctly and recommends using the component's public API to avoid unintended side effects. Further improvements were suggested for type safety and preventing stale validation classes. Additionally, the new public methods and properties are missing the JSDoc @SInCE tags required by the repository style guide.

Comment thread packages/core/src/components/radio/radio.tsx Outdated
Comment thread packages/core/src/components/radio-group/radio-group.tsx
Comment thread packages/core/src/components/radio/radio.tsx Outdated
Comment thread packages/core/src/components/radio/radio-validation.ts
Comment thread packages/core/src/components/radio/radio-validation.ts Outdated
@sonarqubecloud

sonarqubecloud Bot commented May 6, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant