From fb295ebc12a5909983c048d9b0054ef0e538f5cc Mon Sep 17 00:00:00 2001 From: Sho Otani Date: Sun, 13 Mar 2016 23:22:16 +0900 Subject: [PATCH 1/2] use field.name for existing error check instead of using field.id --- validate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validate.js b/validate.js index 357aadf..f7ceb59 100755 --- a/validate.js +++ b/validate.js @@ -351,7 +351,7 @@ var existingError; for (j = 0; j < this.errors.length; j += 1) { - if (field.id === this.errors[j].id) { + if (field.name === this.errors[j].name) { existingError = this.errors[j]; } } From 27d05d3e878cd073fe1ae43f8785614272d9c722 Mon Sep 17 00:00:00 2001 From: Sho Otani Date: Mon, 28 Mar 2016 23:02:12 +0900 Subject: [PATCH 2/2] change to possibly check both id and name --- validate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validate.js b/validate.js index f7ceb59..c604cb8 100755 --- a/validate.js +++ b/validate.js @@ -351,7 +351,7 @@ var existingError; for (j = 0; j < this.errors.length; j += 1) { - if (field.name === this.errors[j].name) { + if (field.name === this.errors[j].name && field.id === this.errors[j].id) { existingError = this.errors[j]; } }