Validators / ismn

Edit on Github

Validate an ISMN (International Standard Music Number).

Option Equivalent HTML attribute Type Description
message data-bv-ismn-message String The error message

Example

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>
<script>
$(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'
                    }
                }
            }
        }
    });
});
</script>

Comments

If you want to report a bug, please submit the issue on Github. Do NOT post the issue here.

For a general question or feedback, use the form below.