garygreen / dominar

Lightweight bootstrap validator inspired by Laravel
http://garygreen.github.io/dominar/
22 stars 4 forks source link

Add support for default options for fields #32

Closed garygreen closed 6 years ago

garygreen commented 6 years ago
var dominar = new Dominar(form, {
   full_name: {
     rules: 'required'
   }
}, {
   fields: {
      feedback: false
   }
});

This will apply feedback false to all the fields, except for ones that have it explicitly set.

garygreen commented 6 years ago

Just use dominar.defaults.feedback = false (straight after instantiating the instance)