Skip to content

Feat/2595 input validation checkbox#2550

Draft
khathija-ahamadi wants to merge 3 commits into
mainfrom
feat/2595-input-validation-checkbox
Draft

Feat/2595 input validation checkbox#2550
khathija-ahamadi wants to merge 3 commits into
mainfrom
feat/2595-input-validation-checkbox

Conversation

@khathija-ahamadi
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 checkbox 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
Copy link
Copy Markdown

changeset-bot Bot commented May 18, 2026

⚠️ No Changeset found

Latest commit: 2227da6

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

Copy link
Copy Markdown
Contributor

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

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 the ix-checkbox and ix-checkbox-group components to reset their state and validation. It also implements a shared validation logic that handles required states and novalidate forms, along with corresponding integration tests. Feedback focuses on adhering to the repository style guide by adding missing @since tags to the new public methods and suggests simplifying the validation logic by removing a redundant ClassMutationObserver in favor of direct state synchronization.

);
}

@Method()
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.

medium

The new clear method is missing JSDoc documentation and the @SInCE tag required by the repository style guide.

  /**
   * Resets the checkbox group to its initial state and clears validation.
   *
   * @since 2.2.0
   */
  @Method()
References
  1. Ensure that each new component, property, method, or event has a JSDocs which contains a @SInCE tag with the version number of the release in which it was added. (link)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer please confirm if we need to add '@SInCE version' for @method() ?

Comment thread packages/core/src/components/checkbox/checkbox.tsx Outdated
Comment on lines +224 to +226
/**
* Resets the checkbox to its initial unchecked state and clears validation.
*/
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.

medium

The JSDoc for the new clear method is missing the @SInCE tag required by the repository style guide.

  /**
   * Resets the checkbox to its initial unchecked state and clears validation.
   *
   * @since 2.2.0
   */
References
  1. Ensure that each new component, property, method, or event has a JSDocs which contains a @SInCE tag with the version number of the release in which it was added. (link)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer please confirm if we need to add '@SInCE version' for @method() ?

@netlify
Copy link
Copy Markdown

netlify Bot commented May 21, 2026

Deploy Preview for ix-storybook ready!

Name Link
🔨 Latest commit 2227da6
🔍 Latest deploy log https://app.netlify.com/projects/ix-storybook/deploys/6a0f3f7230322400088a78f8
😎 Deploy Preview https://deploy-preview-2550--ix-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud
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