Validate an International Bank Account Number (IBAN).
Option | HTML attribute | Type | Description |
---|---|---|---|
country |
data-bv-iban-country |
String | An ISO-3166 country code. It's dynamic option |
message |
data-bv-iban-message |
String | The error message |
If the country
is not defined, it will be parsed from the IBAN number.
The validator supports the following countries (sorted by the country code in alphabetical order):
<form id="ibanForm" class="form-horizontal">
<div class="form-group">
<label class="col-lg-3 control-label">IBAN</label>
<div class="col-lg-5">
<input type="text" class="form-control" name="iban" />
</div>
</div>
</form>
$(document).ready(function() {
$('#ibanForm').bootstrapValidator({
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
iban: {
validators: {
iban: {
message: 'The value is not valid IBAN'
}
}
}
}
});
});
The following validators might be useful to you: