onPlaced
option which is called when the icon element is inserted to the document.
icon
:
new
FormValidation
.
plugins
.
Icon
(
{
...
,
onPlaced
:
function
(
e
)
{
// e.classes is an object containing values
// for valid, invalid and validating CSS classes
// e.element is the field element
// e.field is the field name
// e.iconElement is the icon element
}
}
)
,
<
style
>
.fv-plugins-icon
[
data-field
=
'username'
]
,
.fv-plugins-icon
[
data-field
=
'email'
]
{
display
:
inline-block
;
position
:
static
;
height
:
auto
;
line-height
:
normal
;
}
style
>
<
input
name
=
"
username
"
/>
...
<
input
name
=
"
email
"
/>