Smahane Smahane - 1 year ago 60
CSS Question

How to edit the css style of validation ng-class error

My question is very simple:

How can I edit the css style of the

validation error 'error' of bootstrap v3?

Here is my code:

ng-class="(form.datos.$invalid) && ( form.datos.$touched || submitted) ? 'error': '' "

The error style here is a background red which I didn't like I want to change it to another color.

Answer Source

You should overrite the css but if you want to do it with angular you could use ng-style directive, and it would look like

ng-style="(form.datos.$invalid) && ( form.datos.$touched || submitted) && {'background-color':'#00F'}"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download