kopia lustrzana https://github.com/shoelace-style/shoelace
Remove incorrect validation examples
rodzic
56b64940ca
commit
662e76ce34
docs/components
|
@ -156,28 +156,4 @@ Add descriptive help text to an input with the `help-text` slot.
|
|||
</sl-select>
|
||||
```
|
||||
|
||||
### Validation
|
||||
|
||||
Show a valid or invalid state by setting the `valid` and `invalid` attributes, respectively. Help text can be used to provide feedback for validation and will be styled accordingly.
|
||||
|
||||
```html preview
|
||||
<sl-select placeholder="Valid" valid>
|
||||
<sl-menu-item value="option-1">Option 1</sl-menu-item>
|
||||
<sl-menu-item value="option-2">Option 2</sl-menu-item>
|
||||
<sl-menu-item value="option-3">Option 3</sl-menu-item>
|
||||
|
||||
<div slot="help-text">This is a valid selection!</div>
|
||||
</sl-select>
|
||||
|
||||
<br>
|
||||
|
||||
<sl-select placeholder="Invalid" invalid>
|
||||
<sl-menu-item value="option-1">Option 1</sl-menu-item>
|
||||
<sl-menu-item value="option-2">Option 2</sl-menu-item>
|
||||
<sl-menu-item value="option-3">Option 3</sl-menu-item>
|
||||
|
||||
<div slot="help-text">This is not a valid selection!</div>
|
||||
</sl-select>
|
||||
```
|
||||
|
||||
[component-metadata:sl-select]
|
||||
|
|
|
@ -68,22 +68,6 @@ Add descriptive help text to a textarea with the `help-text` slot.
|
|||
</sl-textarea>
|
||||
```
|
||||
|
||||
### Validation
|
||||
|
||||
Show a valid or invalid state by setting the `valid` and `invalid` attributes, respectively. Help text can be used to provide feedback for validation and will be styled accordingly.
|
||||
|
||||
```html preview
|
||||
<sl-textarea label="Valid" valid>
|
||||
<div slot="help-text">This is a valid textarea.</div>
|
||||
</sl-textarea>
|
||||
|
||||
<br>
|
||||
|
||||
<sl-textarea label="Invalid" invalid>
|
||||
<div slot="help-text">This is an invalid textarea.</div>
|
||||
</sl-textarea>
|
||||
```
|
||||
|
||||
### Prevent Resizing
|
||||
|
||||
By default, textareas can be resized vertically by the user. To prevent resizing, set the `resize` attribute to `none`.
|
||||
|
|
Ładowanie…
Reference in New Issue