cusip validator
Validate a CUSIP number
Options
Using with form field
Name | HTML attribute | Type | Description |
---|
message | data-fv-cusip___message | String | The error message |
Using with ES6 module
import cusip from 'formvalidation/dist/es6/validators/cusip';
const result = cusip().validate({
value: ...,
options: {
message: ...,
},
});
Basic example
ES6 Module Example
The following snippet shows how to use the cusip validator with ES6 module:
import cusip from 'formvalidation/dist/es6/validators/cusip';
const res1 = cusip().validate({
value: '037833100',
options: {
message: 'The value is not valid CUSIP',
},
});
const res2 = cusip().validate({
value: '31430F200',
options: {
message: 'The value is not valid CUSIP',
},
});
See also
Changelog
- Fixed an issue that the cusip validator doesn't work properly