Feat/2595 input validation checkbox#2550
Conversation
|
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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()
| /** | ||
| * Resets the checkbox to its initial unchecked state and clears validation. | ||
| */ |
There was a problem hiding this comment.
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
*/
✅ Deploy Preview for ix-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|



💡 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):
pnpm test)pnpm lint)pnpm build, changes pushed)👨💻 Help & support