Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parsley.js change box-shadow and border-color based on input

On the parsley.js documentation page, the classy demo has an implementation of adding a red border and box-shadow if the input did not pass validation. How can I implement this same feature? I looked at the css being applied on the :focus state of the "Full Name" input and found that a bootstrap class is added, but I cannot figure out how.

Please help.

like image 775
Ilan Biala Avatar asked Dec 20 '22 20:12

Ilan Biala


1 Answers

Just add the following CSS-Class to your input:

input.parsley-error
    {
      color: #B94A48 !important;
      background-color: #F2DEDE !important;
      border: 1px solid #EED3D7 !important;
    }
like image 61
mgrunwald Avatar answered Dec 24 '22 01:12

mgrunwald