sedol validator

Validate a SEDOL (Stock Exchange Daily Official List)

Options

Using with form field

The HTML attributes are used to set the validator options via the Declarative plugin

Name HTML attribute Type Description
message data-fv-sedol___message String The error message

Using with JavaScript module


// You might need to change the importing path
import sedol from 'formvalidation/validators/sedol';

const result = sedol().validate({
    value: ...,
    options: {
        message: ...,
    },
});
/*
result is an object of
{
    valid: true or false,
    message: The error message
}
*/

Basic Example

You can click on sample to see if it's a valid or invalid SEDOL.

Sample Is valid?
0263494
B0WNLY7

Module Example

The following snippet shows how to use the sedol validator with JavaScript module:


// You might need to change the importing path
import sedol from 'formvalidation/validators/sedol';

const res1 = sedol().validate({
    value: '0263494',
    options: {
        message: 'The value is not valid SEDOL',
    },
});
// res1.valid === true

const res2 = sedol().validate({
    value: 'B0WNLY8',
    options: {
        message: 'The value is not valid SEDOL',
    },
});
// res2.valid === false

Related validators

The following validators are similar to this one and might be useful to you.

Name Description
cusip Validate a CUSIP
isin Validate an ISIN (International Securities Identification Number)