Please have a look especially at the section for form validation within the overall components/forms page.
Additionally to the browser built-in pseudo-selector :user-invalid we're providing styling for the aria-invalid="true" attribute as well.
:user-invalid
aria-invalid="true"