This site contains the document for old version. Please upgrade to the latest version v1.0.0

ein validator

Validate an EIN (Employer Identification Number)

Validators

Options

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

Example

<form id="einForm" class="form-horizontal">
    <div class="form-group">
        <label class="col-xs-3 control-label">EIN</label>
        <div class="col-xs-5">
            <input type="text" class="form-control" name="ein" />
        </div>
    </div>
</form>

<script>
$(document).ready(function() {
    $('#einForm').formValidation({
        framework: 'bootstrap',
        icon: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
            ein: {
                validators: {
                    ein: {
                        message: 'The value is not valid EIN'
                    }
                }
            }
        }
    });
});
</script>
<form id="einForm" 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">EIN</label>
        <div class="col-xs-5">
            <input type="text" class="form-control" name="ein"
                data-fv-ein="true"
                data-fv-ein-message="The value is not valid EIN" />
        </div>
    </div>
</form>

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