Skip to content

Commit 8fe5113

Browse files
committed
Merge pull request victorjonsson#39 from stevewasiura/patch-7
modify valAttr setter, to allow external scripts to set element validati...
2 parents 2726c44 + b4221bc commit 8fe5113

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

form-validator/jquery.form-validator.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@
166166
} else if( val === false || val === null ) {
167167
return this.removeAttr('data-validation-'+name);
168168
} else {
169-
return this.attr('data-validation-'+name, val);
169+
if(name.length > 0) name='-'+name;
170+
return this.attr('data-validation'+name, val);
170171
}
171172
};
172173

0 commit comments

Comments
 (0)