From 9db217558e769d8bf0f2471bffb5c5687b9edfc6 Mon Sep 17 00:00:00 2001 From: jlukic Date: Wed, 6 May 2015 16:44:00 -0400 Subject: [PATCH] Typo in form rule --- src/definitions/behaviors/form.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/definitions/behaviors/form.js b/src/definitions/behaviors/form.js index 3e1f427a1..8c0644f8b 100644 --- a/src/definitions/behaviors/form.js +++ b/src/definitions/behaviors/form.js @@ -1129,20 +1129,20 @@ $.fn.form.settings = { }, // matches another field - different: function(value, fieldIdentifier) { + different: function(value, identifier) { // use either id or name of field var $form = $(this), matchingValue ; - if( $('[data-validate="'+ fieldIdentifier +'"]').length > 0 ) { - matchingValue = $('[data-validate="'+ fieldIdentifier +'"]').val(); + if( $('[data-validate="'+ identifier +'"]').length > 0 ) { + matchingValue = $('[data-validate="'+ identifier +'"]').val(); } - else if($('#' + fieldIdentifier).length > 0) { - matchingValue = $('#' + fieldIdentifier).val(); + else if($('#' + identifier).length > 0) { + matchingValue = $('#' + identifier).val(); } - else if($('[name="' + fieldIdentifier +'"]').length > 0) { - matchingValue = $('[name="' + fieldIdentifier + '"]').val(); + else if($('[name="' + identifier +'"]').length > 0) { + matchingValue = $('[name="' + identifier + '"]').val(); } else if( $('[name="' + identifier +'[]"]').length > 0 ) { matchingValue = $('[name="' + identifier +'[]"]'); @@ -1154,20 +1154,20 @@ $.fn.form.settings = { }, // matches another field - match: function(value, fieldIdentifier) { + match: function(value, identifier) { // use either id or name of field var $form = $(this), matchingValue ; - if( $('[data-validate="'+ fieldIdentifier +'"]').length > 0 ) { - matchingValue = $('[data-validate="'+ fieldIdentifier +'"]').val(); + if( $('[data-validate="'+ identifier +'"]').length > 0 ) { + matchingValue = $('[data-validate="'+ identifier +'"]').val(); } - else if($('#' + fieldIdentifier).length > 0) { - matchingValue = $('#' + fieldIdentifier).val(); + else if($('#' + identifier).length > 0) { + matchingValue = $('#' + identifier).val(); } - else if($('[name="' + fieldIdentifier +'"]').length > 0) { - matchingValue = $('[name="' + fieldIdentifier + '"]').val(); + else if($('[name="' + identifier +'"]').length > 0) { + matchingValue = $('[name="' + identifier + '"]').val(); } else if( $('[name="' + identifier +'[]"]').length > 0 ) { matchingValue = $('[name="' + identifier +'[]"]');