I have a form and the default is readonly for each input. Try to remove readonly attribute when input doesn't qualify the bootstrap validator.
Is there any way to check form with bootstrap validator without submit the button? like checking inside document ready?
How to remove readonly attribute when it doesn't qualify bootstrap validator checking?
<div class="content">
<div class="col-md-12 bg boxCover" >
<div class="row">
<div class="col-md-12 col-sm-12">
<div class ="form-group">
<label for="nama">Nama Lengkap<span class="text-danger">*</span></label>
<input type="text" id="customerName" readonly name="customerName" value="<?php echo $customerName?>" required class="form-control clean">
</div>
</div>
</div>
</div>
</div>
JS
$('#formInput').bootstrapValidator({
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
customerName: {
validators: {
regexp: {
regexp: "^[A-Za-z., ]+$",
}
}
}
}
});