Getting Started

Turret plugin

Integrate with the turretcss framework
The plugin supports turretcss v5.1.3.

Usage

The following piece of code is the starting point to validate the form made in turretcss:
            
< html >
< head >
< link rel = " stylesheet " href = " https://cdnjs.cloudflare.com/ajax/libs/bigfishtv-turret/5.1.3/turretcss.min.css " />
< link rel = " stylesheet " href = " /vendors/formvalidation/dist/css/formValidation.min.css " />
head >
< body >
< form id = " demoForm " method = " POST " > ... form >
< script src = " https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.35.3/es6-shim.min.js " > script >
< script src = " /vendors/formvalidation/dist/js/FormValidation.min.js " > script >
< script src = " /vendors/formvalidation/dist/js/plugins/Turret.min.js " > script >
< script >
document . addEventListener ( 'DOMContentLoaded' , function ( e ) {
FormValidation . formValidation (
document . getElementById ( 'demoForm' ) ,
{
fields : {
...
} ,
plugins : {
turret : new FormValidation . plugins . Turret ( ) ,
...
} ,
}
) ;
} ) ;
script >
body >
html >
The sample code above assumes that the FormValidation files are placed inside the vendors directory. You might need to change the path depending on where you place them on the server.
The next sections list out some examples of various forms made with turretcss.

Stacked form

You need to add the fv-stacked-form class to the form element such as:
            
< form class = " fv-stacked-form " >
...
form >
Stacked form

Changelog

v1.4.0
  • Support Turret CSS v5.1.3
v1.2.0
  • First release. It means that the Turret plugin requires FormValidation v1.2.0 or newer