Skip to content

Commit

Permalink
fix(form): length is deprececated and doubled since 2.0.6
Browse files Browse the repository at this point in the history
The length rule is deprecated since SUI 2.0.6, instead minLength, maxLength and exactLength were introduced back then.
Even the docs do not use it in any examples
  • Loading branch information
lubber-de committed Aug 26, 2021
1 parent d601d62 commit 3a25bb5
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/definitions/behaviors/form.js
Expand Up @@ -1586,7 +1586,6 @@ $.fn.form.settings = {
doesntContain : '{name} cannot contain "{ruleValue}"',
doesntContainExactly : '{name} cannot contain exactly "{ruleValue}"',
minLength : '{name} must be at least {ruleValue} characters',
length : '{name} must be at least {ruleValue} characters',
exactLength : '{name} must be exactly {ruleValue} characters',
maxLength : '{name} cannot be longer than {ruleValue} characters',
match : '{name} must match {ruleValue} field',
Expand Down Expand Up @@ -1866,14 +1865,6 @@ $.fn.form.settings = {
;
},

// see rls notes for 2.0.6 (this is a duplicate of minLength)
length: function(value, requiredLength) {
return (value !== undefined)
? (value.length >= requiredLength)
: false
;
},

// is exactly length
exactLength: function(value, requiredLength) {
return (value !== undefined)
Expand Down

0 comments on commit 3a25bb5

Please sign in to comment.