Validate an ISMN (International Standard Music Number).
Option | HTML attribute | Type | Description |
---|---|---|---|
message |
data-bv-ismn-message |
String | The error message |
ISMN | Result |
---|---|
M230671187 | |
979-0-0601-1561-5 | |
979 0 3452 4680 5 | |
9790060115615 | |
9790060115614 |
<form id="ismnForm" class="form-horizontal">
<div class="form-group">
<label class="col-lg-3 control-label">ISMN</label>
<div class="col-lg-5">
<input type="text" class="form-control" name="ismn" />
</div>
</div>
</form>
$(document).ready(function() {
$('#ismnForm').bootstrapValidator({
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
ismn: {
validators: {
ismn: {
message: 'The value is not valid ISMN'
}
}
}
}
});
});
The following validators might be useful to you: