| Name | HTML attribute | Type | Description |
|---|---|---|---|
baseValue
|
data-fv-step___base-value
|
Float
|
The base value, default to 0 |
message
|
data-fv-step___message
|
String
|
The error message |
step
|
data-fv-step___step
|
Float
|
The step, default to 1 |
// You might need to change the importing path
import
step
from
'formvalidation/dist/es6/validators/step'
;
const
result
=
step
(
)
.
validate
(
{
value
:
...
,
options
:
{
baseValue
:
...
,
message
:
...
,
step
:
...
,
}
,
}
)
;
/*
result is an object of
{
valid: true or false,
message: The error message
}
*/
step
option isn't passed to the placeholder message