issn validator
Validate an ISSN (International Standard Serial Number)
Options
Using with form field
| Name | HTML attribute | Type | Description |
|---|
message | data-fv-issn___message | String | The error message |
Using with ES6 module
import issn from 'formvalidation/dist/es6/validators/issn';
const result = issn().validate({
value: ...,
options: {
message: ...,
},
});
Basic example
ES6 Module Example
The following snippet shows how to use the issn validator with ES6 module:
import issn from 'formvalidation/dist/es6/validators/issn';
const res1 = issn().validate({
value: '0024-9319',
options: {
message: 'The value is not valid ISSN',
},
});
const res2 = issn().validate({
value: '0032-147X',
options: {
message: 'The value is not valid ISSN',
},
});
See also