If you try to set a custom validation manager in ColdBox 3.7.0 (by setting validation.manager to a CFC path, as described on the validation wiki page), Coldbox will error with the message “Can’t cast String [coldbox.system.validation.ValidationManager] to a value of type [Struct]”.
This is because in CFCApplicationLoader on line 925, parseValidation tries to call structAppend on the default value and the specified value, which are both string. This is the current code:
if( structKeyExists(validationDSL,“manager”) ){
structAppend( arguments.config.validation.manager, validationDSL.manager, true); // Line 925; the first two arguments are both strings
}
It instead needs to overwrite the default value with the new value, like this:
if( structKeyExists(validationDSL,“manager”) ){
arguments.config.validation.manager = validationDSL.manager;
}