| Name | HTML attribute | Type | Description |
|---|---|---|---|
message
|
data-fv-bic___message
|
String
|
The error message |
// You might need to change the importing path
import
bic
from
'formvalidation/dist/es6/validators/bic'
;
const
result
=
bic
(
)
.
validate
(
{
value
:
...
,
options
:
{
message
:
...
,
}
,
}
)
;
/*
result is an object of
{
valid: true or false,
message: The error message
}
*/
// You might need to change the importing path
import
bic
from
'formvalidation/dist/es6/validators/bic'
;
const
res1
=
bic
(
)
.
validate
(
{
value
:
'DSBACNBXSHA'
,
options
:
{
message
:
'The value is not valid BIC'
,
}
,
}
)
;
// res1.valid === true
const
res2
=
bic
(
)
.
validate
(
{
value
:
'RZ00AT2L303'
,
options
:
{
message
:
'The value is not valid BIC'
,
}
,
}
)
;
// res2.valid === false