event
object contains the following properties:
| Property | Type | Description |
|---|---|---|
element
|
HTMLElement
|
The field element which is being validated |
elements
|
HTMLElement[]
|
The field elements |
field
|
String
|
The field name |
validator
|
String
|
The validator name |
result
|
Object
|
The validation result. It can include other meta data |
const
fv
=
FormValidation
.
formValidation
(
document
.
getElementById
(
'demoForm'
)
,
{
...
}
)
;
fv
.
on
(
'core.validator.validated'
,
function
(
event
)
{
...
}
)
;
import
{
formValidation
}
from
'/path/to/-validation/cjs/bundle/popular'
;
const
fv
=
formValidation
(
document
.
getElementById
(
'demoForm'
)
,
{
...
}
)
;
fv
.
on
(
'core.validator.validated'
,
function
(
event
)
{
...
}
)
;
import
{
formValidation
}
from
'-validation/bundle/popular'
;
const
fv
=
formValidation
(
document
.
getElementById
(
'demoForm'
)
,
{
...
}
)
;
fv
.
on
(
'core.validator.validated'
,
function
(
event
)
{
...
}
)
;