Using Spectre framework icons

The Spectre framework provides a built-in icons set which can be used with Spectre plugin plugin. In order to use these icons, you have to wrap the field in a has-icon-right class:
<div class="has-icon-right">
<input type="text" class="form-input" name="name" />
Below is a starting point to use the Icon plugin along with the Spectre plugin:
<!-- Put them in the head tag -->
<link rel="stylesheet" href="" />
<link rel="stylesheet" href="" />
<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 src="/vendors/formvalidation/dist/js/plugins/Spectre.min.js"></script>
document.addEventListener('DOMContentLoaded', function(e) {
fields: {
plugins: {
spectre: new FormValidation.plugins.Spectre(),
icon: new FormValidation.plugins.Icon({
valid: 'form-icon icon icon-check',
invalid: 'form-icon icon icon-cross',
validating: 'form-icon loading',
Using Spectre framework icons

See also