FormValidation v0.8.1 is released, supports Bootstrap 4 alpha 3

meid validator

Validate a MEID (mobile equipment identifier)

Validators

Options

Option HTML attribute Type Description
message data-fv-meid-message String The error message
When setting options via HTML attributes, remember to enable the validator by setting data-fv-meid="true".
The message option can be updated on the fly via the updateMessage() method

Example

<form id="meidForm" class="form-horizontal">
    <div class="form-group">
        <label class="col-xs-3 control-label">MEID</label>
        <div class="col-xs-5">
            <input type="text" class="form-control" name="meid" />
        </div>
    </div>
</form>

<script>
$(document).ready(function() {
    $('#meidForm').formValidation({
        framework: 'bootstrap',
        icon: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
            meid: {
                validators: {
                    meid: {
                        message: 'The value is not valid MEID'
                    }
                }
            }
        }
    });
});
</script>
<form id="meidForm" class="form-horizontal"
    data-fv-framework="bootstrap"
    data-fv-icon-valid="glyphicon glyphicon-ok"
    data-fv-icon-invalid="glyphicon glyphicon-remove"
    data-fv-icon-validating="glyphicon glyphicon-refresh">

    <div class="form-group">
        <label class="col-xs-3 control-label">MEID</label>
        <div class="col-xs-5">
            <input type="text" class="form-control" name="meid"
                data-fv-meid="true"
                data-fv-meid-message="The value is not valid MEID" />
        </div>
    </div>
</form>

<script>
$(document).ready(function() {
    $('#meidForm').formValidation();
});
</script>

Related validators

The following validators might be useful to you: