Skip to content

Commit

Permalink
* Regression when doing global replacements for validationData. It …
Browse files Browse the repository at this point in the history
…was changed to a `!isStruct()` but in reality, it has to be simple ONLY for replacements.
  • Loading branch information
lmajano committed May 17, 2021
1 parent 0bc79de commit ad5f0db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

----

Expand Down
5 changes: 2 additions & 3 deletions models/result/ValidationResult.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand Down

0 comments on commit ad5f0db

Please sign in to comment.