Semantic plugin

Integrate with Semantic UI framework. Support Semantic UI v2.4.1


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

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

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

Horizontal form

Stacked form

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 Semantic plugin will look for the .fields element. But in the stacked form, evey field will be placed inside a .field container.

We need to use the rowSelector option to help the plugin determine the field containers as following:

Multiple fields on the same row

Due to the same reason mentioned in the Stacked form section above, the rowSelector option will be used to determine the field containers.

In the following example, the firstName and lastName fields are placed inside .five.field containers. Meanwhile, the city, state and zipcode fields can be found inside the .four.field containers.


  • v1.2.0: Supported Semantic UI v2.3.3
  • v1.0.0: First release