validation - Override Bootstrap Material Design event listener for <input> element -


i have angular2 component uses bootstrap material design look'n'feel

@component({  selector:'inputcustom',  template:`     <div class="form-group label-floating has-error">         <label class="control-label" for="input">type here</label>         <input class="form-control" id="input" type="text">         <p class="help-block">some error text</p>         <span class="material-input"></span>     </div> `}) class inputcustom{....} 

i use angular2 track field changes , want control visuals of component manually i.e. when in error state applying class 'has-error' outer <div> element.

currently when apply class 'has-success' angular2 controller component, bootstrap overrides class 'has-error'.

how can override/stop bootstrap md tracking validation/input events on <input> elements?

i figured out, disable validation before starting library.

<script type="text/javascript">     $.material.options.validate = false;     $.material.init();  </script> 

Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -