I am trying to implement form validation with Bootstrap 4 and JQuery-validation, but can\'t seem to make it work.
My form is displayed as a Modal dialog as shown nex
None of your input
elements contain a name
. If you want to use this plugin, any element considered for validation must contain a name
attribute and when declaring rules via the rules
object, this name
is referenced, not the id
.
See the docs:
"Mandated: A 'name' attribute is required for all input elements needing validation, and the plugin will not work without this. A 'name' attribute must also be unique to the form, as this is how the plugin keeps track of all input elements."