validateForm() {
var acc = [];
var _this = this;
+ var checkboxGroupName;
+
+ // Remember first form submission to prevent specific checkbox validation (more than one required) until form got initially submitted
+ if (!this.initialized) {
+ this.initialized = true;
+ }
+ // skip validation if disabled
+ if (this._validationIsDisabled()) {
+ this.formnovalidate = null;
+ return true;
+ }
+
this.$inputs.each(function() {
+
+ // Only use one checkbox per group since validateCheckbox() iterates over all associated checkboxes
+ if ($(this)[0].type === 'checkbox') {
+ if ($(this).attr('name') === checkboxGroupName) return true;
+ checkboxGroupName = $(this).attr('name');
+ }
+
acc.push(_this.validateInput($(this)));
});