Using FontAwesome icons

Follow the sample code below to use the icons provided by FontAwesome :
        
< link rel = " stylesheet " href = " https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css " />
< link rel = " stylesheet " href = " /vendors/formvalidation/dist/css/formValidation.min.css " />
< form id = " demoForm " > ... form >
< script src = " /vendors/formvalidation/dist/js/FormValidation.min.js " > script >
< script >
document . addEventListener ( 'DOMContentLoaded' , function ( e ) {
FormValidation . formValidation (
document . getElementById ( 'demoForm' ) ,
{
fields : {
...
} ,
plugins : {
icon : new FormValidation . plugins . Icon ( {
valid : 'fa fa-check' ,
invalid : 'fa fa-times' ,
validating : 'fa fa-refresh' ,
} ) ,
} ,
}
) ;
} ) ;
script >
If you want to use the FontAwesome SVG icon instead of its CSS classes, take a look at the Using SVG icons example.
Using FontAwesome icons

See also