UIKit plugin

Integrate with UIkit framework. Support UIKit v3.0.3


The following piece of code is the starting point to validate the form made in UIKit:

There are some important things here:

  • 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.
  • Uikit.min.js is the plugin provided by FormValidation. It is NOT the same as uikit(.min).js file provided by the UIKit framework.

The next sections list out some examples of various forms made with UIKit.

Horizontal form

Stacked form

Multiple fields on the same row

In order to add the correct class for error message and the field element when it is a valid or invalid, we need to specify the CSS selector of the field container.

By default, the UIKit plugin will look for the .uk-margin element. In the following example, the firstName and lastName fields are placed inside .uk-width-2-5 containers. Meanwhile, the city, state and zipcode fields can be found inside the .uk-width-1-5 containers.

The rowSelector option will be used to help the plugin determine the field containers as following:


  • v1.0.0: First release