From 0bc79de3c630f9d3eee05bc1959b117f440b71fb Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Sat, 15 May 2021 17:59:34 -0500 Subject: [PATCH 1/3] version bump --- box.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/box.json b/box.json index 143bd66..d0df80e 100644 --- a/box.json +++ b/box.json @@ -1,7 +1,7 @@ { "name":"ColdBox Validation", "author":"Ortus Solutions ", - "version":"3.1.0", + "version":"3.2.0", "location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbvalidation/@build.version@/cbvalidation-@build.version@.zip", "slug":"cbvalidation", "type":"modules", From ad5f0db0e08f44c9f5370aa95f06fc283fb54f8d Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Mon, 17 May 2021 18:11:44 -0500 Subject: [PATCH 2/3] * Regression when doing global replacements for `validationData`. It was changed to a `!isStruct()` but in reality, it has to be simple ONLY for replacements. --- changelog.md | 7 +++++++ models/result/ValidationResult.cfc | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 1ea2604..1b32bb7 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +---- + +## [3.1.0] => 2021-MAY-17 + +### Fixed + +* Regression when doing global replacements for `validationData`. It was changed to a `!isStruct()` but in reality, it has to be simple ONLY for replacements. ---- diff --git a/models/result/ValidationResult.cfc b/models/result/ValidationResult.cfc index 3d70013..4e360a0 100644 --- a/models/result/ValidationResult.cfc +++ b/models/result/ValidationResult.cfc @@ -193,9 +193,8 @@ component accessors="true" { arguments.error.getValidationType(), "all" ); - // The validation data, should be skipped if validationData is a struct - // Only possible because error.getvaldationData is returning any now - if ( !isStruct( arguments.error.getValidationData() ) ) { + // Validation data that is SIMPLE ONLY! + if ( isSimpleValue( arguments.error.getValidationData() ) ) { arguments.message = replaceNoCase( arguments.message, "{validationData}", From 73d3d53914c90ae47476d7e6881bd1ea0911fe6a Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Mon, 17 May 2021 18:12:03 -0500 Subject: [PATCH 3/3] patch release --- box.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/box.json b/box.json index d0df80e..1c52df2 100644 --- a/box.json +++ b/box.json @@ -1,7 +1,7 @@ { "name":"ColdBox Validation", "author":"Ortus Solutions ", - "version":"3.2.0", + "version":"3.1.1", "location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbvalidation/@build.version@/cbvalidation-@build.version@.zip", "slug":"cbvalidation", "type":"modules",