Skip to content

Commit 864affe

Browse files
committed
Merge branch 'master' of github.com:victorjonsson/jQuery-Form-Validator
2 parents 3cacde2 + a89d21c commit 864affe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

form-validator/jquery.form-validator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,12 +580,12 @@
580580
* @protected
581581
*/
582582
$.fn.valAttr = function (name, val) {
583+
name = ((name.length > 0) ? '-' + name : '');
583584
if (val === undefined) {
584-
return this.attr('data-validation-' + name);
585+
return this.attr('data-validation' + name);
585586
} else if (val === false || val === null) {
586-
return this.removeAttr('data-validation-' + name);
587+
return this.removeAttr('data-validation' + name);
587588
} else {
588-
name = ((name.length > 0) ? '-' + name : '');
589589
return this.attr('data-validation' + name, val);
590590
}
591591
};

0 commit comments

Comments
 (0)