Reconcile Angular.js and Bootstrap form validation styling

前端 未结 12 2019
刺人心
刺人心 2020-12-22 18:53

I am using Angular with Bootstrap. Here is the code for reference:

12条回答
  •  伪装坚强ぢ
    2020-12-22 19:53

    If styling is the issue, but you don't want to disable the native validation, why not override the styling with your own, more specific style?

    input.ng-invalid, input.ng-invalid:invalid {
       background: red;
       /*override any styling giving you fits here*/
    }
    

    Cascade your problems away with CSS selector specificity!

提交回复
热议问题