Skip to content

Commit 6eff1d1

Browse files
authored
ENGCOM-5390: fix validation class for max-words #23541
2 parents c2ec7e5 + bf4b6c1 commit 6eff1d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/web/mage/validation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
rules = {
227227
'max-words': [
228228
function (value, element, params) {
229-
return this.optional(element) || $.mage.stripHtml(value).match(/\b\w+\b/g).length < params;
229+
return this.optional(element) || $.mage.stripHtml(value).match(/\b\w+\b/g).length <= params;
230230
},
231231
$.mage.__('Please enter {0} words or less.')
232232
],

0 commit comments

Comments
 (0)