From d2c4547dc04b79b274e6033d86ff076b34d52d6e Mon Sep 17 00:00:00 2001 From: jlukic Date: Thu, 16 Jul 2015 13:31:34 -0400 Subject: [PATCH] #2629 Fixes duck typing in form validation to check rules and id --- RELEASE-NOTES.md | 1 + src/definitions/behaviors/form.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 3416b2b12..40fe09664 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -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** diff --git a/src/definitions/behaviors/form.js b/src/definitions/behaviors/form.js index 970edc1bc..2095bb661 100644 --- a/src/definitions/behaviors/form.js +++ b/src/definitions/behaviors/form.js @@ -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) {