If you are looking for validation you should check out form behaviors.
A field is a form element containing a label and an input
A set of fields can appear grouped together
Field groups automatically receive responsive styling, swapping to one field per row on mobile devices.
A textarea can be used to allow for extended user input.
To specify an approximate text area size use the
A form can contain a checkbox
UI checkbox are special, styled versions of standard HTML checkboxes.
A form can include a radio checkbox
A form can contain a dropdown
Dropdown will automatically convert
elements initialized as dropdowns. For more details check out the dropdown docs
A multiple select is used to include several choices with one form field
A form can contain a message
warning message blocks found inside a form are hidden by default.
- Please enter your first name
- Please enter your last name
If a form is in loading state, it will automatically show a loading indicator.
If a form is in an success state, it will automatically show any success message blocks.
You're all signed up for the newsletter.
If a form is in an error state, it will automatically show any error message blocks.
You can only sign up for an account once with a given e-mail address.
If a form is in warning state, it will automatically show any warning message block.
Individual fields may display an error state
Individual fields may be disabled
Individual fields may be read only
Forms can automatically divide fields to be equal width
A form on a dark background may have to invert its color scheme
A field can have its label next to instead of above it.
A field can show that input is mandatory
Fields can have their widths divided evenly
Fields can show related choices
Fields can automatically divide fields to be equal width
Multiple fields may be inline in a row