Skip to content

Commit 9393c30

Browse files
author
wpdebruin
authored
fix for BOX-63 and BOX-68
validationData cannot be converted to a string for UDF,RequiredUnless,RequiredIf,Unique so they are excluded from this message replacement
1 parent 2593258 commit 9393c30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/result/ValidationResult.cfc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ component accessors="true" {
163163
// The validation type
164164
arguments.message = replacenocase( arguments.message, "{validationType}", arguments.error.getValidationType(), "all");
165165
// The validation data
166-
if( arguments.error.getValidationType() neq 'UDF' ){
166+
if( !listfindnocase( "UDF,RequiredUnless,RequiredIf,Unique", arguments.error.getValidationType() )){
167167
arguments.message = replacenocase( arguments.message, "{validationData}", arguments.error.getValidationData(), "all");
168168
}
169169
// The target name of the object
@@ -291,4 +291,4 @@ component accessors="true" {
291291
return this;
292292
}
293293

294-
}
294+
}

0 commit comments

Comments
 (0)