Validate an IMO (International Maritime Organization)
Option | HTML attribute | Type | Description |
---|---|---|---|
message |
data-bv-imo-message |
String | The error message |
IMO | Result |
---|---|
IMO 9074729 | |
imo 9074729 | |
9074729 | |
IMO 9074728 |
<form id="imoForm" class="form-horizontal">
<div class="form-group">
<label class="col-lg-3 control-label">IMO</label>
<div class="col-lg-5">
<input type="text" class="form-control" name="imo" />
</div>
</div>
</form>
$(document).ready(function() {
$('#imoForm').bootstrapValidator({
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
imo: {
validators: {
imo: {
message: 'The value is not valid IMO'
}
}
}
}
});
});