Skip to content

Commit

Permalink
Fix stripped-min-length check
Browse files Browse the repository at this point in the history
$(value).text() is wrong in here. Actually this will evaluate to $("someinputtext").text() where $("someinputtext") is an empty object and therefor the check will always return false as the upcoming method .text() returns an empty string.
$(element) is the input element.
  • Loading branch information
avoelkl committed Feb 17, 2016
1 parent fdc06a4 commit 6d996b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/web/mage/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
],
"stripped-min-length": [
function (value, element, param) {
return $(value).text().length >= param;
return $(element).val().length >= param;
},
'Please enter at least {0} characters'
],
Expand Down

0 comments on commit 6d996b8

Please sign in to comment.