sedol validator
Validate a SEDOL (Stock Exchange Daily Official List)
Options
Using with form field
Name | HTML attribute | Type | Description |
---|
message | data-fv-sedol___message | String | The error message |
Using the ES6 module
import { sedol } from '/vendors/@form-validation/cjs/validator-sedol';
const result = sedol().validate({
value: ...,
options: {
message: ...,
},
});
Using the npm package
- Install the validator package:
$ npm install @form-validation/validator-sedol
import { sedol } from '@form-validation/validator-sedol';
const result = sedol().validate({
value: ...,
options: {
message: ...,
},
});
Basic example
NPM package example
The following snippet shows how to use the sedol validator with the npm package:
import { sedol } from '@form-validation/validator-sedol';
const res1 = sedol().validate({
value: '0263494',
options: {
message: 'The value is not valid SEDOL',
},
});
const res2 = sedol().validate({
value: 'B0WNLY8',
options: {
message: 'The value is not valid SEDOL',
},
});
See also
Changelog