diff --git a/box.json b/box.json index 143bd66..1c52df2 100644 --- a/box.json +++ b/box.json @@ -1,7 +1,7 @@ { "name":"ColdBox Validation", "author":"Ortus Solutions ", - "version":"3.1.0", + "version":"3.1.1", "location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbvalidation/@build.version@/cbvalidation-@build.version@.zip", "slug":"cbvalidation", "type":"modules", 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}",