Skip to content

Commit

Permalink
fix(docs): Fixes radio-group small issue [skip ci]
Browse files Browse the repository at this point in the history
- Fixes issue when setCustomValidity was called on one example
  • Loading branch information
jeysonj2 committed Aug 4, 2023
1 parent fa40189 commit 0af2257
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/pages/components/radio-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ Use the `setCustomValidity()` method to set a custom validation message. This wi
const errorMessage = 'You must choose the last option';
// Set initial validity as soon as the element is defined
customElements.whenDefined('o-radio').then(() => {
await Promise.all([
customElements.whenDefined('o-radio'),
customElements.whenDefined('o-radio-group'),
]).then(() => {
radioGroup.setCustomValidity(errorMessage);
});
Expand Down

0 comments on commit 0af2257

Please sign in to comment.