validateField
(
field
:
String
)
:
Promise
| Parameter | Type | Description |
|---|---|---|
field
*
|
String
|
The field name |
const
fv
=
FormValidation
.
formValidation
(
document
.
getElementById
(
'demoForm'
)
,
{
...
}
)
;
fv
.
validateField
(
'userName'
)
.
then
(
function
(
status
)
{
// status can be one of the following value
// 'NotValidated': The element is not yet validated
// 'Valid': The element is valid
// 'Invalid': The element is invalid
...
}
)
;
import
formValidation
from
'formvalidation/dist/es6/core/Core'
;
const
fv
=
formValidation
(
document
.
getElementById
(
'demoForm'
)
,
{
...
}
)
;
fv
.
validateField
(
'userName'
)
.
then
(
function
(
status
)
{
// status can be one of the following value
// 'NotValidated': The element is not yet validated
// 'Valid': The element is valid
// 'Invalid': The element is invalid
...
}
)
;