addField
(
field
:
String
,
options
:
Object
)
:
Core
| Parameter | Type | Description |
|---|---|---|
field
*
|
String
|
The field name |
options
|
Object
|
The field options. The options will be merged with the original validator rules if the field is already defined |
const
fv
=
FormValidation
.
formValidation
(
document
.
getElementById
(
'demoForm'
)
,
{
...
}
)
;
fv
.
addField
(
...
)
;
import
formValidation
from
'formvalidation/dist/es6/core/Core'
;
const
fv
=
formValidation
(
document
.
getElementById
(
'demoForm'
)
,
{
...
}
)
;
fv
.
addField
(
...
)
;