Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Materialize CSS Showing errors on form fields

Is it possible to set the validation error color on form fields manually? I couldn't really figure out how it was doing the validation on their site. Seems like the browser is doing it automatically based on the type attribute. But what CSS would I need to attach to trigger that state? I need to do a custom validation on a text field and the one that browser does automatically is not enough.

like image 950
CookieEater Avatar asked Oct 10 '15 20:10

CookieEater


1 Answers

As I already wrote as a comment. You just need to add the invalid class to your element.

Next time you could use the inspect element tool which is built-in in Chrome.

like image 108
Jannis Lehmann Avatar answered Oct 04 '22 11:10

Jannis Lehmann