bic validator
Validate a BIC (Business Identifier Codes)
Options
Using with form field
Name | HTML attribute | Type | Description |
---|
message | data-fv-bic___message | String | The error message |
Using with ES6 module
import bic from 'formvalidation/dist/es6/validators/bic';
const result = bic().validate({
value: ...,
options: {
message: ...,
},
});
Basic example
ES6 Module Example
The following snippet shows how to use the bic validator with ES6 module:
import bic from 'formvalidation/dist/es6/validators/bic';
const res1 = bic().validate({
value: 'DSBACNBXSHA',
options: {
message: 'The value is not valid BIC',
},
});
const res2 = bic().validate({
value: 'RZ00AT2L303',
options: {
message: 'The value is not valid BIC',
},
});
See also