programer.tips, another cool thing from @nghuuphuoc!

sedol validator

Validate a SEDOL (Stock Exchange Daily Official List)

Validators

Improve it on Github

Options

Option HTML attribute Type Description
message data-bv-sedol-message String The error message
When setting options via HTML attributes, remember to enable the validator by setting data-bv-sedol="true".

Example

SEDOL Result
0263494
B0WNLY7
<form id="sedolForm" class="form-horizontal">
    <div class="form-group">
        <label class="col-sm-3 control-label">SEDOL</label>
        <div class="col-sm-5">
            <input type="text" class="form-control" name="sedol" />
        </div>
    </div>
</form>
$(document).ready(function() {
    $('#sedolForm').bootstrapValidator({
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
            sedol: {
                validators: {
                    sedol: {
                        message: 'The value is not valid SEDOL'
                    }
                }
            }
        }
    });
});

Related validators

The following validators might be useful to you: