Skip to content

Commit

Permalink
fix: vendor.js validation mark invalid fields
Browse files Browse the repository at this point in the history
fix: vendor.js validation mark invalid fields

Client side validation was not highlighting invalid fields. Particularly the store profile settings page was not highlighting invalid fields.
  • Loading branch information
sagescrub committed Jan 24, 2019
1 parent 44cf748 commit 7652905
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/dokan.js
Original file line number Diff line number Diff line change
Expand Up @@ -1521,12 +1521,12 @@ jQuery(function($) {
$.validator.setDefaults({ ignore: ":hidden" });

var validatorError = function(error, element) {
var form_group = $(element).closest('.form-group');
var form_group = $(element).closest('.dokan-form-group');
form_group.addClass('has-error').append(error);
};

var validatorSuccess = function(label, element) {
$(element).closest('.form-group').removeClass('has-error');
$(element).closest('.dokan-form-group').removeClass('has-error');
};

var api = wp.customize;
Expand Down

0 comments on commit 7652905

Please sign in to comment.