diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index ca907e4c1..880f33e9a 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,6 +1,11 @@ ## RELEASE NOTES ### Version 2.0.6 - July x, 2015 + +**Important Notes** + +- **Form Validation** - In `2.0.4` `length` rules were corrected to match "exact length" and not "minimum length". This may have caused issues for those who were using this rule as min length previously. This may have caused accidental breaking changes. We've remedied this in `2.0.6.` by returning `length` to functioning as "minimum length" and added a new rule `exactLenght` for matching exact length. + **[Reported Bugs](https://github.com/Semantic-Org/Semantic-UI/issues?q=is%3Aissue+milestone%3A2.0.6+is%3Aclosed)** - **Dropdown** - Fixed `restore value` sometimes now working correctly due to "animating out" label still being mistaken for selected. - **Dropdown** - Added `set exactly` to remedy confusion of `set selected` not removing current selections with multiple diff --git a/src/definitions/behaviors/form.js b/src/definitions/behaviors/form.js index 2095bb661..e19bcab85 100644 --- a/src/definitions/behaviors/form.js +++ b/src/definitions/behaviors/form.js @@ -1191,22 +1191,30 @@ $.fn.form.settings = { return (value.search( new RegExp(text) ) === -1); }, - // is exactly length - length: function(value, requiredLength) { + // is at least string length + minLength: function(value, requiredLength) { return (value !== undefined) - ? (value.length == requiredLength) + ? (value.length >= requiredLength) : false ; }, - // is at least string length - minLength: function(value, requiredLength) { + // 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) + ? (value.length == requiredLength) + : false + ; + }, + // is less than length maxLength: function(value, maxLength) { return (value !== undefined)