Skip to content

Commit a89d21c

Browse files
Merge pull request victorjonsson#468 from dariusz-rzeznik/patch-1
Update jquery.form-validator.js
2 parents a744d25 + 6ef7f34 commit a89d21c

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
@@ -565,12 +565,12 @@
565565
* @protected
566566
*/
567567
$.fn.valAttr = function (name, val) {
568+
name = ((name.length > 0) ? '-' + name : '');
568569
if (val === undefined) {
569-
return this.attr('data-validation-' + name);
570+
return this.attr('data-validation' + name);
570571
} else if (val === false || val === null) {
571-
return this.removeAttr('data-validation-' + name);
572+
return this.removeAttr('data-validation' + name);
572573
} else {
573-
name = ((name.length > 0) ? '-' + name : '');
574574
return this.attr('data-validation' + name, val);
575575
}
576576
};

0 commit comments

Comments
 (0)