Skip to content

Commit bf4b6c1

Browse files
ENGCOM-5390: fix validation class for max-words #23541
- Merge Pull Request #23541 from sunilit42/magento2:validation-issue-for-max-word - Merged commits: 1. 9e95177
2 parents f94b4a8 + 9e95177 commit bf4b6c1

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)