Skip to content

Commit

Permalink
docs(autocomplete, input, input-text): update pattern context for res…
Browse files Browse the repository at this point in the history
…iding in a parent form (#11285)

**Related Issue:** #11148

## Summary
Updates the `pattern` prop in `autocomplete`, `input`, and `input-text`
that to use the prop the component must reside within a form element,
re:
#11148 (comment).
  • Loading branch information
geospatialem authored Jan 15, 2025
1 parent 6427e5f commit 2bb1ef5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ export class Autocomplete
@property({ reflect: true }) overlayPositioning: OverlayPositioning = "absolute";

/**
* Specifies a regex pattern the component's `value` must match for validation.
* When the component resides in a form,
* specifies a regular expression (regex) pattern the component's `value` must match for validation.
* Read the native attribute's documentation on MDN for more info.
*
* @mdn [step](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ export class InputText
@property({ reflect: true }) name: string;

/**
* Specifies a regex pattern the component's `value` must match for validation.
* When the component resides in a form,
* specifies a regular expression (regex) pattern the component's `value` must match for validation.
* Read the native attribute's documentation on MDN for more info.
*
* @mdn [step](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern)
Expand Down
3 changes: 2 additions & 1 deletion packages/calcite-components/src/components/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ export class Input
@property({ reflect: true }) numberingSystem: NumberingSystem;

/**
* Specifies a regex pattern the component's `value` must match for validation.
* When the component resides in a form,
* specifies a regular expression (regex) pattern the component's `value` must match for validation.
* Read the native attribute's documentation on MDN for more info.
*
* @mdn [step](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern)
Expand Down

0 comments on commit 2bb1ef5

Please sign in to comment.