Skip to content

Commit

Permalink
#2629 Fixes duck typing in form validation to check rules and id
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Jul 16, 2015
1 parent db968a4 commit d2c4547
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- **Form** - Fixed issue with `minLength[1]` validation not behaving same as `minLength > 2` #2636.
- **Form** - Form fields will now error when a non-string identifier is used
- **Form** - Added `doesntContain` and `doesntContainExactly` #
- **Form** - Fixes errors when a field identifier is named `identifier` #2629
- **Formatting** - Fixed several source files that had `CR LF` (Windows) line endings #2649

**Additional Bugs**
Expand Down
2 changes: 1 addition & 1 deletion src/definitions/behaviors/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ $.fn.form = function(parameters) {
var
keys = Object.keys(parameters),
isLegacySettings = (keys.length > 0)
? (parameters[keys[0]].identifier !== undefined)
? (parameters[keys[0]].identifier !== undefined && parameters[keys[0]].rules !== undefined)
: false
;
if(isLegacySettings) {
Expand Down

0 comments on commit d2c4547

Please sign in to comment.