diff --git a/jquery.formvalidator.js b/jquery.formvalidator.js index c87fea1..aad2ddf 100755 --- a/jquery.formvalidator.js +++ b/jquery.formvalidator.js @@ -237,6 +237,11 @@ // Validate element values // $form.find('input,textarea,select').each(function() { + + if ($(this).attr("data-optional") == 'true' && $(this).val() == '') { + return true; + } + if (!ignoreInput($(this).attr('name'), $(this).attr('type'))) { // memorize border color