Added form control info

pull/200/head
Cory LaViska 2020-08-28 16:53:39 -04:00
rodzic 50775daec8
commit 484e2fe875
1 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -188,3 +188,12 @@ When a component relies on the presence of a slot to do something, don't assume
- Don't conditionally render any slots — always use `hidden` or `display: none` so the slot exists in the DOM
See the source of card, dialog, or drawer for examples.
### Form Controls
All form controls that can be validated should:
- Have an `invalid` prop that reflects its validity
- Have a `setCustomValidity()` method so the user can set a custom validation message
- Have a `reportValidity()` method that reports its validity for form submission
- Adhere to native attributes such as `required`, `pattern`, `minlength`, `maxlength`, etc. when it makes sense